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

Total for largest 30 values

Hi,

I have a bar chart with top 30 people with highest number of meetings. I'm trying to add text to chart with the information about total number of meetings for them, but I don't know how to calculate such thing. What is the easiest way to calculate sum of totals for top 30? Please help, thanks in advance.

1 Solution

Accepted Solutions
Not applicable
Author

Thanks, it didn't worked for me - maybe I did something wrong...

I looked for other solution and inspired by this topic: http://community.qlik.com/message/48857#48857  I wrote the expression which works perfect:

sum(aggr(if(rank(count(PeopleID))<=30,count(PeopleID)), PeopleID))

View solution in original post

4 Replies
tresesco
MVP
MVP

you can have a look at RANK function.

Regards,  tresesco

Not applicable
Author

I've tried to use it, but I don't know how should the whole expression for this look like, not only for rank function, but for totals that are for people ranked 1-30.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi paulina6735

     You can get this by using this expression

     =Sum({<PeopleID={"=(Rank(Sum(Meetings))<=30)"}>}Aggr(Sum(Meetings),PeopleID))

Celambarasan

Not applicable
Author

Thanks, it didn't worked for me - maybe I did something wrong...

I looked for other solution and inspired by this topic: http://community.qlik.com/message/48857#48857  I wrote the expression which works perfect:

sum(aggr(if(rank(count(PeopleID))<=30,count(PeopleID)), PeopleID))