Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
i have an Pivot table with Prices of the actuale year "Preis", Prices of previous year "Preis_Vorjahr", the % change of the Price "relative Abweichung", the costs of the goods last year "Warenkosten VJ" and the calculated value with the Price cange "Warenkosten progn.".
The total sum of the calculated new Price column gives a difference of 0,02€.
Can somebody explain it or give me an example, how to do it right?
The column "Warenkosten progn." is wrong, the correct sum of the rows is 979,57 not 979,55
Thanks to all
Now I got it. The right aggregation expression is:
=sum(aggr(round(sum(Warenkosten_VJ)*(sum(Preis)/sum(Preis_Vorjahr)-1)/100+sum(Warenkosten_VJ),0.01),ID))
Probably is due to rounding, you loose decimal places tat when summed lead to different totals
thanks for the answer.
i have changed the decimals to 14 but the value is the same
0,00000000000000
84,33828000000000
0,00000000000000
161,45768484307600
0,00000000000000
0,00000000000000
168,67656000000000
565,10189695076600
0,00000000000000
Add your example if you can
The aggregated sum should be: 979,58
What is the expression of this field?
the value should by 979,58 thats correct.
The Expression of the column is:
"Warenkosten VJ"*"relative Abweichung")/100+"Warenkosten VJ"
include the other expressions
"Warenkosten VJ"
({<Jahr={$(=getfieldselections(Jahr)-1)}>} Lieferantenstatistik.Umsatz)
"relative Abweichung"
(Sum({<Jahr={$(=getfieldselections(Jahr))}>} ItemPosition.Preis_BE)/Sum({<Jahr={$(=getfieldselections(Jahr)-1)}>} ItemPosition.Preis_BE))-1)
Hi,
Try to use Num function for <relative Abweichung> and <main expression> as below:
Num(relative Abweichung exp, '#,##0.0##')
Num(("Warenkosten VJ" * "relative Abweichung")*100 + "Warenkosten VJ", '#,##0.0##')
Could you attach an example please..
i have made a short example of my solution, because the data in the original are not for public use. In my example i get the same, wrong values.
Now I got it. The right aggregation expression is:
=sum(aggr(round(sum(Warenkosten_VJ)*(sum(Preis)/sum(Preis_Vorjahr)-1)/100+sum(Warenkosten_VJ),0.01),ID))