# Qlik Sense App Development

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

Any suggestion/help is appreciated.

Thank you.

Tags (2)
Labels (1)
• ### Total of Specific Columns is incorrect in Pivot Table

1 Solution

Accepted Solutions
MVP

## Re: Total of Specific Columns is incorrect in Pivot Table

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
2 Replies
MVP

## Re: Total of Specific Columns is incorrect in Pivot Table

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
New Contributor III

## Re: Total of Specific Columns is incorrect in Pivot Table

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

I appreciate it.

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