Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in display grand total of top n teams

These are two tables. In first one all teams all included, while in 2nd table top 3 teams w.r.t. highest win are included. My problem is that I am unable to display the grand total of 2nd table as 218 and 78. How can I display the grand total as I have tried under expression tab to how the sum of number of rows only not the expression total but it does not work.

    

TEAMWINLOST
Grand Total389206
PAKISTAN5021
INDIA4432
BANGLADESH2246
SRI LANKA5529
AUSTRALIA7719
NEW ZEALAND5926
SOUTH AFRICA8233
TEAMWINLOST
Grand Total21878
SOUTH AFRICA8233
AUSTRALIA7719
NEW ZEALAND5926
20 Replies
Not applicable
Author

I think you have understood my problem. I also think that problem is with my expression, so here is my expression

for win

sum(team_win)

for lost

sum(team_lost)

sunny_talwar

Remove the Max value condition from the presentation tab and try this

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, Sum(team_win)), TEAM))

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, Sum(team_LOST)), TEAM))

Not applicable
Author

I am working on the formula you have given, but in the mean time would you please tell me that what could be the formula if I want to COUNT number of teams also not only their win and lost.

sunny_talwar

May be this

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, 1), TEAM))

Not applicable
Author

The following expression is not producing the desire result, please send me correct for counting not for sum.

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, 1), TEAM))


The following expression is producing the desire result with slight amendment

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, Sum(team_win)), TEAM))

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, Sum(team_LOST)), TEAM))

sunny_talwar

The following expression is not producing the desire result, please send me correct for counting not for sum.

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, 1), TEAM))

It seems like you ordering me... ... Anyways, unless I know what you are after, I don't think I will be able to help

The following expression is producing the desire result with slight amendment

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, Sum(team_win)), TEAM))

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, Sum(team_LOST)), TEAM))

What amendment did you make? May be future visitors can benefit from it

Not applicable
Author

Instead of < I have used <= and Max Number under presentation has to be used with variable .

Have you found the expression for counting? 

sunny_talwar

I have not... I am not sure what you are looking to do?

Not applicable
Author

I simply want count not sum

sunny_talwar

Then what is wrong with this?

Sum(Aggr(If(Rank(Sum(team_win)) < Variable, 1), TEAM))

Should give you count