20 Replies Latest reply: Oct 14, 2017 6:29 AM by Arshad Hussain

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.

 TEAM WIN LOST Grand Total 389 206 PAKISTAN 50 21 INDIA 44 32 BANGLADESH 22 46 SRI LANKA 55 29 AUSTRALIA 77 19 NEW ZEALAND 59 26 SOUTH AFRICA 82 33 TEAM WIN LOST Grand Total 218 78 SOUTH AFRICA 82 33 AUSTRALIA 77 19 NEW ZEALAND 59 26
• Re: Problem in display grand total of  top n teams

Is that second table is club to first table? and Please let us know your intend with sample qvw..

• Re: Problem in display grand total of  top n teams

The 2nd table is extracted from original table by using the vCounter variable (having value 0 to 7 where 0 means all team) in Max number(1 - 100) under presentation tab.

• Re: Problem in display grand total of  top n teams

True, That is showing in your original post. But, What you are needed?

• Re: Problem in display grand total of  top n teams

The problem is with my grand total whether the value of vCounter is 0 or any other number upto 7, the grand total always shows win 389 lost 206 while it should be varied, lets see the 2nd table the grand total in QV for win is 389 and lost 206 ignoring the selection of vCounter value while if I select top 3 i.e., value of vCounter =3 then grand total should be win 218 and lost 78 which is correct.

• Re: Problem in display grand total of  top n teams

I am guessing, you have done Dimension limits for Top table. Can you share file to test

• Re: Problem in display grand total of  top n teams

The problem is with my grand total whether the value of vCounter is 0 or any other number upto 7, the grand total always shows win 389 lost 206 while it should be varied, lets see the 2nd table the grand total in QV for win is 389 and lost 206 ignoring the selection of vCounter value while if I select top 3 i.e., value of vCounter =3 then grand total should be win 218 and lost 78 which is correct.

• Re: Problem in display grand total of  top n teams

What are your expressions? Are you using dimension limits for your second table?

• Re: Problem in display grand total of  top n teams

No I am not using dimension limit, as I have told you that I have used variable with name vCounter with initial value set to 0and in presentation tab you can see the Max Number having value 1 - 100 by default in Max Number, I have used that variable instead of fixed values.

• Re: Problem in display grand total of  top n teams

Expression for each of the tables?

• Re: Problem in display grand total of  top n teams

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)

• Re: Problem in display grand total of  top n teams

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

• Re: Problem in display grand total of  top n teams

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.

• Re: Problem in display grand total of  top n teams

May be this

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

• Re: Problem in display grand total of  top n teams

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

• Re: Problem in display grand total of  top n teams

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

• Re: Problem in display grand total of  top n teams

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

Have you found the expression for counting?

• Re: Problem in display grand total of  top n teams

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

• Re: Problem in display grand total of  top n teams

I simply want count not sum

• Re: Problem in display grand total of  top n teams

Then what is wrong with this?

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

Should give you count

• Re: Problem in display grand total of  top n teams

What is the function 1 in the above expression?