Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bad total in straight table?

I have a straight table that is displaying total at top. But when I add up the values of the 3 individual rows the total is off by 459,597,417. How can this be?

From export to excel:

Test GroupsCounters
1,206,456,434
Test Group 161,380,482
Test Group 2433,704,449
Test Group 31,170,968,920
Sum()1,666,053,851
Diff459,597,417
Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I assume there's some kind of if() statement or similar in the straight table expression. The total is evaluated on it's own and is not by default the "sum of rows" but is calculated like any other dimension and is almost certainly correct, just not what you expect in this case.

What I think you want to do is change the Total Mode under Chart Properties > Expressions to "Sum of Rows", which will give you the type of total you expect here.

View solution in original post

4 Replies
mike_garcia
Specialist
Specialist

Are you using a Count Distinct? Is it possible that the counted elements appear in several Test Groups?

Take the following scenario: You have ONE customer that buys in TWO Stores. If you set up a straight table to count distinctly the Customers per Store, you will have two rows (1 per Store) and 1 customer on each row, but the total would still be ONE, because it is just ONE Customer.

If you want to make the total the sum of the results of every row (Sum of Rows), specify that in the Expressions tab (in the middle right).

Hope this helps.

Mike.

Miguel García
Qlik Expert, Author and Trainer
Not applicable
Author

What version are you on ?

ver 9 rel 3 had serious calculation problems

Anonymous
Not applicable
Author

I assume there's some kind of if() statement or similar in the straight table expression. The total is evaluated on it's own and is not by default the "sum of rows" but is calculated like any other dimension and is almost certainly correct, just not what you expect in this case.

What I think you want to do is change the Total Mode under Chart Properties > Expressions to "Sum of Rows", which will give you the type of total you expect here.

Not applicable
Author

Chart Properties > Expressions to "Sum of Rows fixed things.