Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top 5 regions

I've 3 columns Product, region, sales...For each product there is sales in diffrent regions.   I've one 1 region which is Europe let's say..... In my top 5 sales for the region....I always want Europe to be there. So if i  make select any product it shud show me Europe + other 4 regions even if Europe is not featuring in top 5.

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try as calculated dimesion:

=If(aggr(Rank(Sum({<Region-={'Europe'}>}Sales)),Product) < 5 or Region= 'Europe' ,Region)

It gets the top 4 exclusive Europe and then adds Europe to the top 4.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try as calculated dimesion:

=If(aggr(Rank(Sum({<Region-={'Europe'}>}Sales)),Product) < 5 or Region= 'Europe' ,Region)

It gets the top 4 exclusive Europe and then adds Europe to the top 4.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert i managed to get this one rite....... thanks for replying.....ur answer is correct......