Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RighettiAndrea
Contributor III
Contributor III

Pivot Totals Issues

Hi everyone,

I have some issues with the total row in a pivot table.
The screenshots I will show, will be taken from an Excel file that I made as an example.

RighettiAndrea_4-1606916092362.png

In the total row, I have two weighted averages.
The "€ case 2" is correct because the measure is more simple I think.
The "€ case 1" total result, which is red (0.120 €), is what I get instead of the green one (0.585 €).

Here's my measure (it works fine in the table rows)

RighettiAndrea_2-1606915058699.png

How can I fix the measure in order to get the result I want, without affecting the rows of the table?

I hope you understand,

Thank you all!

Labels (3)
1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Hi RighettiAndrea,

Can you try aggr and see if it works ? Something like this: or can you share raw sample data instead of snapshot ?

Aggr(Sum(DOC_VEN_Trans),<Your Dimension>)/1000*Aggr(Sum(DOC_VEN_QTA),<Your Dimension>)/Aggr(Sum(DOC_VEN_Trans),<Your Dimension>)

Best Regards,
KC

View solution in original post

3 Replies
jyothish8807
Master II
Master II

Hi RighettiAndrea,

Can you try aggr and see if it works ? Something like this: or can you share raw sample data instead of snapshot ?

Aggr(Sum(DOC_VEN_Trans),<Your Dimension>)/1000*Aggr(Sum(DOC_VEN_QTA),<Your Dimension>)/Aggr(Sum(DOC_VEN_Trans),<Your Dimension>)

Best Regards,
KC
RighettiAndrea
Contributor III
Contributor III
Author

Hi,
thank you for your answer!

I've tried with the Aggr function many times but the real issue was with some data in the table that I removed because it was not supposed to be in that analysis.

Anyway, the aggr function was perfect for another issue I had in another measure.

Thank you man!

jyothish8807
Master II
Master II

You are welcome 🙂

Best Regards,
KC