# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for
Did you mean:
Contributor III

## Show top 3 values per first dimension

Hi guys,

I am failing at building the TOP3-dimension with the formula

=If(Rank(Sum(TOP3-Category)) <=3, Sum(TOP3-Category))

as it would take ages to process all values. The plan is a table like this here:

 Customer TOP3-Category Sales A Z 500 A Y 300 A X 200 B X 400 B W 350 B Z 50 C Y 1000 C Z 200 C X 100

Nes

Labels (4)

• ### TOP 3

1 Solution

Accepted Solutions
Creator III

create a straight table or pivot chart with two dimension

1. Customer

2.=aggr(if(rank(sum(sales))<=3,[Category]),[Customer],[Category])  (make sure field names are correct)

In expression

4 Replies
Creator III

put the second calculated dimension as

=aggr(if(rank(sum(sales))<=3,[Category]),[Customer],[Category])

Creator III

attaching qvw, i used your data set and showed top 2 out of it, look at the top 2 pivot in qvw

Contributor III
Author
thanks so much but unfortunately i have no permission qvw. could you please explain? 🙂
Creator III

create a straight table or pivot chart with two dimension

1. Customer

2.=aggr(if(rank(sum(sales))<=3,[Category]),[Customer],[Category])  (make sure field names are correct)

In expression