Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner
Partner

dimension limit in set analysis


hello I know in a chart I can use the dimension limit tab to display the top 5 customers that contribute to sales

my expression is sum(sales)

in the dimension limit I selected show First 5

that's fine but now I want to take the total sales of these top 5 customers to divide it by the total sales

how can I take the total sales of the top 5 to divide it by total sales and display result on a text object?

please advise

I can walk on water when it freezes
1 Solution

Accepted Solutions
maxgro
MVP
MVP

top 5 sales (1)

=sum({$<Customer={"=rank(sum(Sales),4)<=5"}>}   Sales)

sales (2)

=sum(Sales)     or  =sum({1} Sales)  

in text box

(1) / (2)

View solution in original post

3 Replies
srchilukoori
Specialist
Specialist

Use the following expression:

=100*Sum(Aggr(if(Rank(Sum(Sales)) <=5, Sum(Sales)), Seller))/Sum({1}Sales)

SC

maxgro
MVP
MVP

top 5 sales (1)

=sum({$<Customer={"=rank(sum(Sales),4)<=5"}>}   Sales)

sales (2)

=sum(Sales)     or  =sum({1} Sales)  

in text box

(1) / (2)

View solution in original post

Oleg_Troyansky
Luminary Alumni
Luminary Alumni

I posted a blog article that describes in detail all the aspects of calculating Top N performers, and some of the pitfalls related to calculated dimensions. Here is the link:

QlikView Blog Q-Tip #5 – Show Top Performers. Common but not too trivial. | Natural Synergies

enjoy!

Oleg Troyansky