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

Set Analysis Count If?

I would like this equation translated into Set Analysis.  This should be fairly straight forward but all the examples show X field is equal to 'X, X.' I am unable to find the correct syntax for an if statement with a comparison.

If today’s < greater than the assigned to date count the number of tickets regardless ofany other selections.

=count(if(num(vToday)<num(ASSIGNEDDATE), (TICKETID)))

Let me know if you have any other questions.

Thanks.

13 Replies
Not applicable
Author

I am:

Attempt 1:

=count({1<ASSIGNEDDATE_NUM={'vToday'}>} TICKETID)

Attempt 2:

=count({1<ASSIGNEDDATE_NUM={vToday}>} TICKETID)

This works if I do this: (but I would like it dynamic)

=count({1<ASSIGNEDDATE_NUM={'40948'}>} TICKETID)

Not applicable
Author

'$(vToday)'

Anonymous
Not applicable
Author

No need for if.  Or youcan use if witout set.  You have to use the example from Karl, but with

ASSIGNEDDATE_NUM

count({$<ASSIGNEDDATE_NUM={">$(vToday"}> TICKETID)

Not applicable
Author

Thank you Federico and Michael. Both solutions work.  Beleow is what I ended up using.

=count({1<ASSIGNEDDATE_NUM={$(vToday)}>} TICKETID)