Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Vijayqlik4171
Contributor III
Contributor III

I want show top 3 values like T1,T2,T3 and Bottom T7,T8,T9

Screenshot_20210831-194602.png

5 Replies
stevejoyce
Specialist II
Specialist II

Top 3:

if(rank(sum(value), 4, 1) <=3, dimension)

Bottom 3:

if(rank(-sum(value), 4, 1) <=3, dimension)

 

If you want to display in a text box you can do 

=concat(aggr(if(rank(-sum(value), 4, 1) <=3, dimension), dimension), dimension & ', ')

Vijayqlik4171
Contributor III
Contributor III
Author

can you please explain me why we use 4,1 in synatax

stevejoyce
Specialist II
Specialist II

Honestly, mostly because of habit I used this and from how i typically want rank functions i've use this.  This impacts when there are ties in ranks and how you want to handle it.  I think it's really the 2nd parameter that i'm concerned about.  But at this point i go with 1,1 or 4,1 out of habit.  2 in the second parameter doesn't assign all dimension values with the ranks when there are ties.  3 will return 1-2 or 3-5 when there are ties.  

https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/ChartFunctions/Ra...

 

Vijayqlik4171
Contributor III
Contributor III
Author

thank you 

stevejoyce
Specialist II
Specialist II

Hi @Vijayqlik4171 please mark this thread appropriately either marking solution or any outstanding issue so the thread can be closed for future community questions that are simliar.

Thanks.