Forum Discussion
Calculations are retruning incorrect numbers
Hi everyone
I'm puzzeled with the dataset I have.
For some reason, when I only select "crop" the totals are incorrect, if I select "crop" and "master consignee", totals add up. (image capture 1)
My calculation:
Also, when I select sweet corn as crop, the calcualtion should be (16x3)x47=2256 pieces, yet returns the wrong result. (image capture2)
My calculation:
Hi cocoloco79 ,
You need to make sure the calculation is done individually on each row before it's summarized, otherwise it's going to take the entire quantity (432) and multiply that with the entire remaining quantity (47).
Try the calculation below:Measure = SUMX ( SUMMARIZE ( Product , Product [Product] , "Value" , [InnnerQtyPieces x QtyOuter x Ordered minus Packed] ) , [Value] )
Br,
J
2 Replies
- tex628
Community Champion
Hi cocoloco79 ,
You need to make sure the calculation is done individually on each row before it's summarized, otherwise it's going to take the entire quantity (432) and multiply that with the entire remaining quantity (47).
Try the calculation below:Measure = SUMX ( SUMMARIZE ( Product , Product [Product] , "Value" , [InnnerQtyPieces x QtyOuter x Ordered minus Packed] ) , [Value] )
Br,
J- cocoloco79
Helper III
Thank you very much. This worked.
Sorry for my late reply!