Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

Pivot is not summing the results of my measure correctly - sum and aggr a solution?

Hello,

I am working with a pivot and have recognized that in my unfolded, multi-dimensional pivot the Calculations of one specific measure (which is a multiplication) are not correctly. I have seen this due to the amounts, which were not summing up correctly.

In a table there is the option to manipulate explicitly the "Total Function": Auto, sum ...etc.

This option is not there in a pivot. I have played around with the measure and ended up with sum(aggr(A*B, dim1,dim2,dim3))

After that the (part) sums are correct again...even some of the multiplications have slightly changed, but I am keen to understand why Qlik Sense is not calculating correctly without this?

Any help is much appreciated. Thx a lot!

chriys

Labels (2)
2 Replies
Vegar
MVP
MVP

You never typed the expression you had in prior to =sum(aggr(A*B, dim1,dim2,dim3)), I assume you had =A*B.

A*B is not an aggregation it is a single value operator, Qlik treats =A*B as it was =only(A*B). To aggregate A*B over a collection dimension where you not get one AB  value per row you need to explicit type the aggregation function,  in this case SUM().

 

I don't think you need the aggr, try this function instead

=SUM(A*B)

chriys1337
Creator III
Creator III
Author

Yes, you are right... initial I was using A*B. I will try your recommendation, it makes sense. Thank you!