# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
cancel
Showing results for
Did you mean:
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?

I can walk on water when it freezes
1 Solution

Accepted Solutions
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)

3 Replies
Specialist

Use the following expression:

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

SC

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)

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