Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
olaoyesunday
Contributor II
Contributor II

Top 10 Customers

Hi folks,

 I am new to Qlik Sens. I want to calculate  top 10 Customer based on sales Amount  dynamically using Standard table and a button in my Visualization. 

My dimension is  [Customer Contact Name] while my measure is [Sales Amount].   I used this formular: 

=sum({< [Customer Contact Name] = {"=rank(sum([Sales Amount]))<=vTopNCustomers"} >} [Sales Amount]) in my measure, it works but did not do it in Descending order but I want it in descending order among the 10 top customers.

Please, what can I add to my analysis to sort it in Descending order?

Labels (1)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Welcome to the Qlik ecosystem! A couple of thoughts for you:

- Sorting order is not determined in Set Analysis. You can define it in the Chart Properties (the panel on the right), in the Sorting section.

- While your Set Analysis is correct, you could achieve the same result easier - since your Measure is Sales Amount, and your Dimension is Customer, you could just add a setting for the Dimension to be limited by a "fixed number" and then specify your variable as the fixed number value. Then you don't need set analysis at all.

Having said that - if you have a huge amount of Customers in your data, then the solution with Set Analysis should work much faster than the "easier" solution with the dimension limits.

Cheers,

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Welcome to the Qlik ecosystem! A couple of thoughts for you:

- Sorting order is not determined in Set Analysis. You can define it in the Chart Properties (the panel on the right), in the Sorting section.

- While your Set Analysis is correct, you could achieve the same result easier - since your Measure is Sales Amount, and your Dimension is Customer, you could just add a setting for the Dimension to be limited by a "fixed number" and then specify your variable as the fixed number value. Then you don't need set analysis at all.

Having said that - if you have a huge amount of Customers in your data, then the solution with Set Analysis should work much faster than the "easier" solution with the dimension limits.

Cheers,

olaoyesunday
Contributor II
Contributor II
Author

Thanks, 

I just used a fixed number for the people to understand my question, it can be any inputted Number. 

I have used sort panel and it works the way I wanted to.