Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count items after a certain date field

Hi,

I'm trying to count the number of deliverables that is greater than a certain date field.  As you can see from below, my expression is counting 11, when it should really be only counting 5 entries greater than 1/7/2013.

deliverdate.jpg

Thanks for any help.

Cheers.


1 Solution

Accepted Solutions
MayilVahanan

Hi

Both the date format is not same. So you need to change it.

In script, do like this

Load Date(DeliveryDate, 'DD/MM/YYYY') as DeliveryDate, ..

...

from tablename;

Then

=Count({<DeliveryDate={">=$(=CurrentEntitlementStarDate)"}>}) Distinct Account&CSP_Name)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hello, Carlo.

Try adding single cotes around your $-sign substitution of the variable, like this:

Count({<DeliverDate = {">='$(CurrentEntitlementeStartDate)'"}>} Distinct Account & CSP_Name)

I hope it helps.

Cheers!

tresesco
MVP
MVP

I guess CurrentEntitlementStarDate is a field, if so, try like:

=Count({<DeliveryDate={">=$(=CurrentEntitlementStarDate)"}>}) Distinct ....)

MayilVahanan

Hi

Both the date format is not same. So you need to change it.

In script, do like this

Load Date(DeliveryDate, 'DD/MM/YYYY') as DeliveryDate, ..

...

from tablename;

Then

=Count({<DeliveryDate={">=$(=CurrentEntitlementStarDate)"}>}) Distinct Account&CSP_Name)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks for this - i changed the date format and it is working.

However, i've found something strange where this will work if i have my dashboard filtered down to 1 account.  If I clear my selections to expand the accounts - the expression no longer displays data.  If I remove the = (equal sign) as you suggested, the data appears but it reverts back to its inaccurate state listing items that are not "greater than" the date field.  What does the 'equals' sign do?

Any ideas of why this behaviour occurs?

Thanks.