Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
polisetti
Creator II
Creator II

Rank function on multiple Dimensions

Hi Everyone,

In one of the straight table chart, we are calculating Rank function on one dimension(CITY) and it was working fine till now.

Now when we are including second Dimension(CITY CODE) into the table the Rank metric is showing random number for multiple time.

Below is the function we are using:

(Num(Rank((Sum({<SOURCE={'XXX'}>}PRODUCT_TOTAL_RX)),4,1))*1)

Please advice how to handle Rank on multiple dimensions.

Thanks in Advance,

2 Replies
swuehl
MVP
MVP

Try with the TOTAL qualifier:

(Num(Rank(TOTAL (Sum({<SOURCE={'XXX'}>}PRODUCT_TOTAL_RX)),4,1))*1)

polisetti
Creator II
Creator II
Author

Swuehl,

Thanks for the help.

I made the changes to my expression and It was working fine. However, the sorting order was not changing even double clicking on Rank function.

Could you please help me out. Below is my full expression.

((Num(Rank(

if(isnull(Sum({<SOURCE={'XXX'}>}PRODUCT_TOTAL_RX)),0,

Sum({<SOURCE={'XXX'}>}PRODUCT_TOTAL_RX))

,4,1))*vRankWeight1)