Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
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.
For HRS_STANDARD I calculated two variables, insteltijd and produktietijd. When I add those two at the return function, the calculation at line level is correct, however the total is incorrect. I tried SUMX(SUMMARIZE but I cannot select the two calculated variables when doing so. Can anyone help with the correct syntax?
Solved! Go to Solution.
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.
Hi,
Write this additional measure and drag this to the Table visual
=IF(HASONEVALUE(MFG_ORDER_NAME),[HRS_STANDARD],SUMX(SUMMARIZE(VALUES([MFG_ORDER_NAME]),[MFG_ORDER_NAME],"ABCD",[HRS_STANDARD]),[ABCD]))
Hope this helps.
Hi Ashish,
Tried following extra measure and dragged it into the visual. Still total is incorrect
Hi,
Share the link from where i can download your PBI file. Also, show the expected result in a tet box there.
Greg,
Your solution summarizes also 4.5 hours instead of 32.85 (See measure total).
For the PBix file see: https://drive.google.com/open?id=13X8wROZ0tyUlwI3uahNAZK_Y0u7EtVSy
Hi Ashish,
Hereby the link and expected result. I rebuild the Power BI file to a document based on excel. The original file is a file based on direct query on our data warehouse which I cannot share with underlying data.
This is the link: https://drive.google.com/open?id=13X8wROZ0tyUlwI3uahNAZK_Y0u7EtVSy
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
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.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 23 | |
| 19 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 60 | |
| 52 | |
| 47 | |
| 40 | |
| 38 |