Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
gopal5879
Creator
Creator

Ranking Help

Hello folks need little help!
I need some help on ranking, have expression charges.

I have dimensions product, tin , Want to create rank field based on dimensions selected.

 

If product and Tin are selected below is ranking.

productTinchargesrank
P1T110005
P1T22004
P1T31003
P2T1202
P2T2101

 

If product  is selected below is ranking.

productsalesrank 
p113002 
p2301 

 

If Tin is selected below is ranking.

Tinsalesrank 
    
T110203 
T22102 
T31001 

 

Can someone give me some insight

Labels (1)
1 Solution

Accepted Solutions
Nicole-Smith

The total keyword makes the function "ignore dimensions".  Without it, the rank will return 1 on each row.

View solution in original post

3 Replies
Nicole-Smith

This expression should work in all cases:
rank(total -sum(charges))

I have tested it in all of the various ways, and it looks to work as you want:

Nicole-Smith_0-1590530569456.png

 

gopal5879
Creator
Creator
Author

Thanks You Nicole for you time, I will test it out.  I am not familiar how total is computed. Can you explain in short how Total is computed.

rank(total -sum(charges))

Nicole-Smith

The total keyword makes the function "ignore dimensions".  Without it, the rank will return 1 on each row.