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

Expression to get top 25 values of the total in the field

Hi

WE have a league that we play in each week, and i am doing a qlikview analysis. I need to be able to sum the top 25 scores out of the total number of games we have played eg.

We play 39 games in the season but only the top 25 of each players scores get sumed up to give them their total points.

I am using a straight table with player name as the dimension, and i am using the points field in the expression.

Can someone help me with the expression to do this calculation.

Thanks

3 Replies
pover
Partner - Master
Partner - Master

I don't think I understand the problem completely, but try starting with something like the following:

if(rank(sum(scores),4,1)<25,sum(scores))

Regards.

Not applicable
Author

Thanks for this . I have put it in and i think i understand, and think you have understood.

Question is:

What is the 1,4 for in the expression.?

I understand you are saying 'if the number of scores in the database is less than 25 then sum all, else sum points.

pover
Partner - Master
Partner - Master

It's to tell QlikView what to do in the case of a tie. Look up Chart Ranking Functions in the help for details, but in this case the 4 retuns lowest rank on first row, then is incremented by one for each row and the 1 makes sure only the lowest rank is returned.

In case of a tie you can also have return 2-3 for the second and third place players that are tied.

Regards.