Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tom906123
Contributor
Contributor

Trying to create a ranking table

Hello,

I am trying to create a ranking table based on sum(sales)

I am trying to achieve something like the below then graph the result

 

CustomerJan FebMarApr
abc1231123
xyz1232332
defg4323211

I am trying aggr(rank(sum(sales)),[customer],[month])  but no luck

My data looks something like this:

  

order dateorder monthsalescustomer
9/12/201891500abc123
9/3/201891000xyz123
8/4/201882000defg432
7/5/201872500abc123

Any help would be much appreciated!

Thanks in advance!

3 Replies
sunny_talwar

Have you tried this already?

Dimension

Customer

month (Pivoted)

Expression

Rank(Sum(Sales))

tom906123
Contributor
Contributor
Author

Hi Sunny,

Thanks for your response.

I tried using  the suggested pivot table with the below

1st Dimension: Customer

2nd Dimension: Month

Expression: ranks(sum(sales))

The result shows the below ranking the customer against their self

 

Customermonthrank
abcJan2
abcFeb4
abcMar5
abcApril3
abcMay1
xyzJan1
xyzFeb3
xyzMar5
xyzApril4
xyzMay

2

I would be really interested in see the customers rank against the entire population - any tips?

sunny_talwar

Drag the Month dimension to go across and see if that helps