Forum Discussion
Weighted Average by Code
- Anonymous2 years ago
Hi shanestocks ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:Based on the measure you created I created a variance measure
variance = ABS(([Act.]-SELECTEDVALUE(fUsage[standard_price]))*SUM(fUsage[req_qty]))The act measure you wrote before is correct.
Final outputIf the variance that ultimately shows 2919 at the p_code level is not correct, could you please provide more details on how Sub,Req was created, preferably in a pbix file, please hide private information in advance, and the same please provide your expected results in excel
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi shanestocks ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Based on the measure you created I created a variance measure
variance = ABS(([Act.]-SELECTEDVALUE(fUsage[standard_price]))*SUM(fUsage[req_qty]))
The act measure you wrote before is correct.
Final output
If the variance that ultimately shows 2919 at the p_code level is not correct, could you please provide more details on how Sub,Req was created, preferably in a pbix file, please hide private information in advance, and the same please provide your expected results in excel
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you I will attempt this and let you know.
Ultimately it appears at the P level the calculations are not correct, but at the individual meat levels they are.