
Total sum in Pivot
bglbi Jul 22, 2009 11:24 PM (in response to Daniel Göhlin )Try changing your calculation:
from this:
IF([Curr]>'',SUM([Curr]*[Unddel_ordervalue]),Sum([Unddel_ordervalue]))
To this:
Sum(If([Curr] >"", [Curr]*[Unddel_ordervalue],[Unddel_ordervalue]))
Ed


Total sum in Pivot
Johannes Sunden Jul 23, 2009 5:12 AM (in response to Daniel Göhlin )Hi danne31,
There is a chapter on this in the reference manual. "Sum of rows in a pivot table" or something like that in the back somewhere.
The if statement in the expression can make the dimension independent total be something else than the sum of rows. Still correct, but not what one would like to see. In that case you can aggregate the sums for each dimension value and then sum these up for the total.
if the original expression was: =IF([Curr]>'',SUM([Curr]*[Unddel_ordervalue]),Sum([Unddel_ordervalue]))
You should be able to write: =sum(aggr(IF([Curr]>'',SUM([Curr]*[Unddel_ordervalue]),Sum([Unddel_ordervalue])), Kund_beskrivning))
However, I see that you have more than one dimension hidden under the pivot expansion icons so you might want to add these dimension fields to the aggr function. This is all better explained in the reference manual so I suggest you look up the chapter I'm referring to.
cheers,
Johannes

Total sum in Pivot
Daniel Göhlin Jul 23, 2009 2:07 PM (in response to Johannes Sunden )Hi Johannes!
Perfect! Thanks a lot, it works just the way i want to!
/Daniel 
Total sum in Pivot
jbotha Mar 31, 2010 6:37 AM (in response to Johannes Sunden )Thank you Johannes
I have been pulling my hair out over this for almost 10 hours straight.


