Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with combined date and rank

Hallo,

I'm trying to get a set analysis right (in QLIK Sense) to display the top candidates for today, yesterday etc.

That works and displays the entries from today correctly:

count( {$ <myDate= {"$(=date(today(1),'DD/MM/YYYY'))"} > } myName)

That works and displays my top 10:

Count({<myName= {"=rank(count({<myCondition= {'A','B'}>}myName), 4)<= 10"}>} myName)

However I'm tried in vain to get the top 10 of today's entries

Count({<myName= {"=rank(count({$ <myDate= {"$(=date(today(1),'DD/MM/YYYY'))"} > } myName), 4)<= 10"}>} myName)

Can anyone help me please.Many thanks in advance.

2 Replies
sunny_talwar

Try this:

In the script use Date() function around myDate so that it gets assigned the default Date() function in the script. Once it gets default assigned, you won't have to use Datefield format in the expression above.

LOAD Date(myDate) as myDate,

          ....

FROM...

And then this:

Count({<myName= {"=Rank(Count({$<myDate= {'$(=Date(Today(1)))'}>} myName), 4) <= 10"}>} myName)

Not applicable
Author

Thank you Sunny, I tried it but it doesn't work.