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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

to calculate rank (need replacement of over partition by )

Hi,

I have ID, Year, Country, Value in my table. I have to calculate rank for country for each ID and Year based on the value in script. More the value, best the rank.

For example, for year=2014, ID=1, I have value for 20 countries. I need ranking for them (so rank is from 1 to 20)

Similarly , I have more IDs for the same year, for which the rank should again start from 1.


Please suggest solution.

Thanks

2 Replies
Not applicable
Author

Try using the below expression :

Aggr(Rank(sum({$<Country={'*'}>}Value)), ID,Year)

Not applicable
Author

Hi Jhansi,

I want to calculate this in script, not in chart. Because I need to do further calculations after I get this result.