Forum Discussion
Anonymous
7 years agoNot applicable
Summarize multiple variables
Hi, I need to calculate the standard hours per MFG_ORDER_NAME. This calculated value per individual line is OK, but the sum is incorrect. I tried summarize function but I need help ons this. ...
- 7 years ago
I would probably go with something like:
Measure Total = VAR __table = SUMMARIZE('Table',[MFG_ORDER_NAME],[DEPARTMENT],[BASIS],"__hrsStandard",[HRS STANDARD]) VAR __total = SUMX(__table,[__hrsStandard]) RETURN IF(HASONEVALUE([DEPARTMENT]),[HRS STANDARD],__total)You may have to modify the SUMMARIZE.
Greg_Deckler
7 years agoCommunity Champion
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Anonymous
7 years agoNot applicable
Thanks for your reply. I read your articles. Can you show how my calculation should look like?
- Greg_Deckler7 years agoCommunity Champion
I would probably go with something like:
Measure Total = VAR __table = SUMMARIZE('Table',[MFG_ORDER_NAME],[DEPARTMENT],[BASIS],"__hrsStandard",[HRS STANDARD]) VAR __total = SUMX(__table,[__hrsStandard]) RETURN IF(HASONEVALUE([DEPARTMENT]),[HRS STANDARD],__total)You may have to modify the SUMMARIZE.