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

'Detach' the rank function..maybe with set analysis?

I have a problem with the rank function. The behaviour I need in the sample file attached is as follows:

- Person 'N' is ranked 9th when no selections are made

- If I select Person 'N' then his rank changes to 1st (as the data set is now just one person)

- However, I need chart object CH64, to show his rank assuming no selections had been made

Is that possible?

Thanks in advance!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

This works in both objects:

aggr(rank(sum({1}Points)),Person)

Though you may want this, as it should respect all of the other possible selections. For instance, if you had a date field on which you earned points, and you selected this year, you probably want the rank of the person this year, not for all years.

aggr(rank(sum({<Person=>}Points)),Person)

View solution in original post

4 Replies
Not applicable
Author

Hi,

Please find the attched sample file.

Regards,

Ravi

Not applicable
Author

Thanks Ravi.

Is it possible to have object CH64 show ths rank though OR is it possible to have all the other rows in the main chart hidden except the one selected?

For example, if I select person E then CH64 shows '1' where as I want it to show '15'. Possible?

johnw
Champion III
Champion III

This works in both objects:

aggr(rank(sum({1}Points)),Person)

Though you may want this, as it should respect all of the other possible selections. For instance, if you had a date field on which you earned points, and you selected this year, you probably want the rank of the person this year, not for all years.

aggr(rank(sum({<Person=>}Points)),Person)

Not applicable
Author

John, that's absolutely fantastic. Thanks a lot for your help!