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

Sum of fields do not match

Is this a bug or what?

error loading image

The totals do not match? When you sum it, the totals obviously must be: 1.335,73 | 1.356,63 | -20,89

The properties tab:

error loading image

What's wrong ?

5 Replies
Not applicable
Author

Hi,

In the properties, expressions tab, make the Total Mode to be Sum of Rows, this should sort it out.

I'm afraid I can't tell you why this happens as I've not been bothered too much about finding out why, I just found the solution and used it.

Anonymous
Not applicable
Author

Hi Richard,

I'm guessing that the expression has some kind of If statement. The total will be evaluated just like the expression but not for a specific dimension value. Since it's a pivot table "Sum of Rows" is not available like in a straight table. In this case you will have to use Aggr() to create the same type of functionality. There's a chapter in the reference manual (21.3 Sum of rows in Pivot Tables) that describes how this works.

Not applicable
Author

My apologies, didn't notice it was a pivot, will teach me to read things properly!

Johannes suggestion is right, you should use the aggr function.

Not applicable
Author

Ok but where can I set the Aggr() to get it on the place of total at the bottom of the pivot table? I don't want to make a seperate field for it.

Not applicable
Author

I think what Johannes is suggesting is that you replace your expression (the one that's using the IF statement) with something that uses the AGGR function instead. If it's possible!