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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank?

Hi Folks,

I have a Fileds like below.

ID,Name,Volume is (sum(Volume))

here I want top 10 ID's only who is having max volume

Rank-- ID-- Name--  Volume

1         5     D           500

2         9     X           470

3         8     Y           420

----------------------------------

10       2      C          301

I want top 10 ID's Please help me in this?

I tried this it's not working

rank(sum({<Period = {'>$(=date(max(Period))-$(vTrendingDays)) <=$(=date(max(Period)))'},day={'Y'}>} Volume))<=10

10 Replies
anbu1984
Master III
Master III

Do you want top 10 IDs in a Text box?

EDIT: =Concat(If(Aggr(Rank(Sum(Volume)),ID)<=10,ID),',')

MK_QSL
MVP
MVP

Provide sample data please.. or look into below example...

Rank function in calculated dimension

MayilVahanan

HI

'>$(=date(max(Period))-$(vTrendingDays)) this part gives number instead of date.


May be try like this.

'>$(=date(max(Period)-$(vTrendingDays)))


and also check the date format are same with Period date format.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

I want Top 10 Volume's.

Just assume above i have given the sample data just like that only i want it.

anbu1984
Master III
Master III

Top 10 IDs

=Concat(If(Aggr(Rank(Sum(Volume)),ID)<=10,ID),',')


Top 10 Volume

=Concat(If(Aggr(Rank(Sum(Volume)),ID)<=10,Aggr(Sum(Volume),ID)),',')

simenkg
Specialist
Specialist

sum({<ID={"=Rank(Sum(Volume))<=10"}>} Volume)

Not applicable
Author

I don'y want in text object.

I want it in a straight table

kamielrajaram
Creator III
Creator III

Hi Shravan,

Expression with the rank function =rank(expression,ID)

Then on the Presentation tab tick Max Number box and type 10 in the box

Regards

Kamiel

anbu1984
Master III
Master III

If(Aggr(Rank(Sum(Volume)),ID)<=10,Aggr(Sum(Volume),ID))