Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to make absolute sum?

Hi,

I'm doing fabs(sum(a) - sum(b)) , in a pivot table.

by row, the calculation is good. all figures are in positive.

but, the partial total in pivot is not good, it still do the sum according to the original negative values...

any helps please...

2 Replies
Not applicable
Author

Well, i got the solution.

The calcutlation was doing the sum of the gap in each row.

So, if we are doing it like this fabs( sum (a - b)  ) , the total value will still take the minus sign into the calculation.

But, this sum( fabs( a - b ) ) , will fix the problem.

whiteline
Master II
Master II

Hi.

This will work only if you have one a and b value for each of your dimension values.

More common solution is:

=sum(aggr(fabs(sum(a)-sum(b)), Dimesnion)))