Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Totals in pivot table

Hi everyone,

I'm facing a problem with my development. I'm using a pivot table with 3 expressions:

Sum(Quantity), Sum(Pieces) and Sum(Quantity) / Sum(Pieces).

What I want is the total of the rows on each of these expressions. But, on the third column, the total is equivalent to TOTAL(Quantity)/TOTAL(Pieces) and not the sum of rows.

On my example below, I need to have 322 instead of 121.

Capture.PNG.png

I know I can fix this problem by using a simple table but I really need a pivot table.

Is there a solution to fix this ?

Thanks a lot,

Quentin

4 Replies
Gysbert_Wassenaar

You will have to use the aggr function:

sum(aggr(Sum(Quantity) / Sum(Pieces),Dim1, Dim2, ..., DimN))

Replace Dim1, Dim2, ...,DimN with the dimensions of your pivot table.


talk is cheap, supply exceeds demand
saumyashah90
Specialist
Specialist

I am not sure,

If you can customize that function in expression itself

Anonymous
Not applicable
Author

Hi guys,

Thanks for your answer. Unfortunately, my dimensions are three cyclic groups and the period, so I tried to use your formula on my group and on all the dimensions in this group, it didn't work well.

Not applicable
Author

Hi Guys , can you help me on below link ?

Pivot table how to use Aggr to compute Diff % ?