Hi everyone.
Data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
I assume a Unitprice of $10, therefore I can calculate the Total Turnover as follows:
TotalTurnover:=SUMX(factSales;factSales[Qty]*10) ==> 70
Furthermore, I would like to calculate a 10% discount and I compare the following two options:
TotalNetTurnover1:=SUMX(factSales;[TotalTurnover]*0.9) ==> 81
TotalNetTurnover2:=[TotalTurnover]*0.9 ==> 63
I actually expected both options should result in the same result. But the first option seems to be wrong (81).
The difference between above two formulas is - I guess - due to having customer A ordered one piece twice (2 identical rows). Is this a bug in powerpivot or is it logical to you? May you help to explain?
Many thanks and best regards,
janosh
Data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
I assume a Unitprice of $10, therefore I can calculate the Total Turnover as follows:
TotalTurnover:=SUMX(factSales;factSales[Qty]*10) ==> 70
Furthermore, I would like to calculate a 10% discount and I compare the following two options:
TotalNetTurnover1:=SUMX(factSales;[TotalTurnover]*0.9) ==> 81
TotalNetTurnover2:=[TotalTurnover]*0.9 ==> 63
I actually expected both options should result in the same result. But the first option seems to be wrong (81).
The difference between above two formulas is - I guess - due to having customer A ordered one piece twice (2 identical rows). Is this a bug in powerpivot or is it logical to you? May you help to explain?
Many thanks and best regards,
janosh