4 Replies Latest reply: Jan 24, 2012 4:26 AM by Paulina Bednarek

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.

• Total for largest 30 values

you can have a look at RANK function.

Regards,  tresesco

• Total for largest 30 values

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.

• Total for largest 30 values

Hi paulina6735

You can get this by using this expression

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

Celambarasan

• Total for largest 30 values

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))