Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rank Over D

I am trying to create two separate rankings in expressions - one that ranks a value across all IDs and another that ranks the same value across a subsection of IDs. This is how I would expect it to display:

IDValueCategoryOverall RankCategory Rank
A110A11
A25A32
A38B21
A43B53
A54B42
A61A63

I can write an expression to get the overall rank, but am having no luck with ranking across a subset of the IDs. Here is the formula I'm using for both:

Overall:

Rank(TOTAL Sum({<Status={'ACTIVE'}>} Value),1, 1)

Aggr(Rank(TOTAL Sum({<Status={'ACTIVE'}>} Value),1, 1), Category)


Anyone have experience with this?

1 Solution

Accepted Solutions
its_anandrjs

For OverAll try this

=Aggr(Rank(Sum( {<Status={'ACTIVE'}>} Value)),Category,ID)

For Category Rank

=Aggr(Rank(Sum( {<Status={'ACTIVE'}>} Value), 1, 1), Category, ID)

View solution in original post

3 Replies
sunny_talwar

For Category, try this

Aggr(Rank(Sum({<Status={'ACTIVE'}>} Value), 1, 1), Category, ID)

its_anandrjs

For OverAll try this

=Aggr(Rank(Sum( {<Status={'ACTIVE'}>} Value)),Category,ID)

For Category Rank

=Aggr(Rank(Sum( {<Status={'ACTIVE'}>} Value), 1, 1), Category, ID)

Anonymous
Not applicable
Author

Thank you for the help. I got it to work using the following:

Overall:

=Aggr(Rank(Sum( {<[Status]={'ACTIVE'}>} Value), 1, 1), ID)

Category:

=Aggr(Rank(Sum( {<[Status]={'ACTIVE'}>} Value), 1, 1),Category, ID)