Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

bottom

HI All ,

Iam using the below calculted dimesion to get top 5 clients

=if(aggr(rank(count(Key)),Client)<=5,Client)

How do i use this dimension to show bottom 5 clients

Thanks in advance 

1 Solution

Accepted Solutions
qv_testing
Specialist II
Specialist II

Try this,

=AGGR(IF(Rank(-Sum(Sales),4)<=5,Period),Period)

View solution in original post

9 Replies
jwjackso
Specialist III
Specialist III

Try if(aggr(rank(count(Key)),Client)<=5,(Client,(Numeric,Ascending)))

The sortable Aggr function is finally here!

smilingjohn
Specialist
Specialist
Author

Hi Jerry

this is not wotking

tresesco
MVP
MVP

May be just put minus before your measure count(), like:  =if(aggr(rank(-count(Key)),Client)<=5,Client)

smilingjohn
Specialist
Specialist
Author

H tresseco

its not working.. i tired this one also

i want ti show a  bar chart with bottom 5 clients

and one more bar chart with top 5 client

tresesco
MVP
MVP

Could you post a sample app and explain your expected output there?

sergio0592
Specialist III
Specialist III

So, try to create a variable V_max with :

=max(aggr(rank(count(Key)),Client))-5

And use it in  your formula :

=if(aggr(rank(count(Key)),Client)>=V_max,Client)

jwjackso
Specialist III
Specialist III

As an alternative, just display the Client in the dimension.   For the first expression, use Rank(count(Key)) and hide that  column on the presentation tab.  On the "dimension limits" tab, restrict the values to the largest/smallest 5 and uncheck the "show others" option.

akshaye_c_navale

Hey John,

Try below expression.

For Bottom 3

=IF(Aggr(Rank(-1*sum(Sales),1,1),(Region,(NUMERIC, ASCENDING)))<=3,Region)

For Top 3

=IF(Aggr(Rank(1*sum(Sales),1,1),(Region,(NUMERIC, ASCENDING)))<=3,Region) @

qv_testing
Specialist II
Specialist II

Try this,

=AGGR(IF(Rank(-Sum(Sales),4)<=5,Period),Period)