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: 
Pragna
Contributor III
Contributor III

Total of Specific Columns is incorrect in Pivot Table

Hi  Everyone,

I have created a pivot table with Different measures and dimensions. I want the view the total values of each column. Let's take column C as example here . The total sum of column C is displaying incorrectly in pivot totals.But when I have manually calculated the total of column C the value seems to be different.

Note : Column C is a calculated measure . I have used the formula FABS(Sum([A]-[B)) 

Incorrect_total.png

 

Any suggestion/help is appreciated.

Thank you.

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Its not incorrect - for the total, the expression is the absolute difference between the sum of A and sum of B, which is not the same as the sum of the absolute difference of As and Bs. To get sum of rows in a pivot table for something  like this (absolutes / distincts / ratios), use 

Sum(Aggr(Fabs(Sum(A-B)), dim1, dim2, ...))

Where dim1....dimN is a comma separated list of the chart dimensions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Its not incorrect - for the total, the expression is the absolute difference between the sum of A and sum of B, which is not the same as the sum of the absolute difference of As and Bs. To get sum of rows in a pivot table for something  like this (absolutes / distincts / ratios), use 

Sum(Aggr(Fabs(Sum(A-B)), dim1, dim2, ...))

Where dim1....dimN is a comma separated list of the chart dimensions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Pragna
Contributor III
Contributor III
Author

Thank you so much for your response. This worked perfectly.

I appreciate it.

Sum(Aggr(Fabs(Sum(A-B)), dim1, dim2, ...))