Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
kmmqlick
Contributor III
Contributor III

Top N customers Sales

Hi team,

Thanks for you help in advance. I am facing issue with Top 3, Top 5 customers sales issue.

I am using a bar chart to show sum sales. Dim: Period , Measure: sum(Sales) 

Now default i want to show all customers sum of sales. But the issue is how to get sum sales of Top 3 customers and Top 5 customers in bar chart.

could you please suggest me how to write the expression.

i tried sum({<Customer={"=Rank(Sum(Sales),4)<=3"}>}Sales) -- > Not Getting Correct no's 

Top No issue.JPG

sample date and QVF files are attached.

Regards,

kmm

 

Labels (1)
4 Replies
vikasmahajan

Hi,

Refer following link :

community.qlik.com/t5/New-to-Qlik-Sense/Top-N-Filter-Pane/td-p/1218141

or 

=Aggr(If(Rank(Sum(Sales), 1, 0) <= 5, Customer), Customer)

 

Regards

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
kmmqlick
Contributor III
Contributor III
Author

Hi 

 

RsQK
Creator II
Creator II

Hey, try this:

SUM({<Customer={"=RANK(SUM(TOTAL <Customer> Sales),4)<=3"}>}Sales)

No filters were applied to the sample data you provided:

RsQK_0-1639485918099.png

 

kmmqlick
Contributor III
Contributor III
Author

Hi RsQk,

Thanks for your reply, But not giving correct numbers in bar chart (My bar chart Dim: Period)

once again thanks for your help

Regards,

kmm