Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kanchanaporn
Contributor II
Contributor II

How to Rank 2 measure

How to Rank 2 measure

Rank by units first then if units is equal >> rank by sales 

i use like this not work!!
Aggr(Num(Rank(Sum(Units),Sum(Sales)), name)

please help..

kanchanaporn_1-1718521816795.png

 

 

3 Solutions

Accepted Solutions
TauseefKhan
Creator III
Creator III

Hi @kanchanaporn,

Required Result:     TauseefKhan_0-1718540374025.png

Use this:
=Aggr(
Rank(
Sum(Unit) * 1000000 + Sum(Sales)
),
Name
)

***Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.***

 

 

View solution in original post

kanchanaporn
Contributor II
Contributor II
Author

it try found if same units and sales show like this 

kanchanaporn_0-1718546091360.png

 

View solution in original post

kanchanaporn
Contributor II
Contributor II
Author

i use this it work!!!   thank you for you help

Aggr(Rank(Sum(Unit) * 1000000 + Sum(Sales),4,1),Name)

View solution in original post

3 Replies
TauseefKhan
Creator III
Creator III

Hi @kanchanaporn,

Required Result:     TauseefKhan_0-1718540374025.png

Use this:
=Aggr(
Rank(
Sum(Unit) * 1000000 + Sum(Sales)
),
Name
)

***Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.***

 

 

kanchanaporn
Contributor II
Contributor II
Author

it try found if same units and sales show like this 

kanchanaporn_0-1718546091360.png

 

kanchanaporn
Contributor II
Contributor II
Author

i use this it work!!!   thank you for you help

Aggr(Rank(Sum(Unit) * 1000000 + Sum(Sales),4,1),Name)