The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Need Help,
As seen in below table, i want to have a graph with % wastage value month vise of different materials. Power bi takes average of % wastage and then gives me total wastage value of 26.1% which is not right as its taking average of % values. I want to take sum of zero based consumption and sum of zb wastage absolute and then divide and take % which will give me correct % wastage value. How to do it? so that i just select any month and it gives me % wastage value for all materials in that month
Month | Material | Zero based consumption | ZB wastage absolute | % Wastage |
Jan | Material A | 1,680,439 | 347,006 | 21% |
Jan | Material B | 3,124,885 | 542,495 | 17% |
Jan | Material C | 284,719 | (13,224) | -5% |
Feb | Material A | 404,114 | 159,347 | 39% |
Feb | Material B | 305,169 | 67,219 | 22% |
Feb | Material C | 716,636 | 440,629 | 61% |
Sum | 6,515,963 | 1,543,472 | ||
Total Wastage (%) | 24% (correct value) | 26.1% |
Solved! Go to Solution.
Hi, this sounds like a DAX problem and not a power query. I'm not quite sure about the formula because it was confusing.
However you can try this for a New Measure in DAX:
% value =
DIVIDE (
SUM(Table[ZB wastage absolute]),
SUM(Table[Zero based consumption]),
0
)
Hope this helps,
Happy to help!
Hi, this sounds like a DAX problem and not a power query. I'm not quite sure about the formula because it was confusing.
However you can try this for a New Measure in DAX:
% value =
DIVIDE (
SUM(Table[ZB wastage absolute]),
SUM(Table[Zero based consumption]),
0
)
Hope this helps,
Happy to help!
Have you tried the DAX formula for a new measure? I have updated to match the column names.
Happy to help!