Forum Discussion
Work with hours
- 6 years ago
Estyfodense
Try the following formula: Make sure you do the right formatting of duration 13:30:55 (h:nn:ss)Total Hours = SUMX( hh, HH[Final hour ] - HH[start time] )Net Total Hours = [Total Hours] - IF( WEEKDAY(MAX(HH[Date]),1) = 7 ,TIME(8,0,0), TIME(4,0,0))Check Day, I
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
- 6 years ago
To get the correct total, use this measure that references the solution @Fowmy
Total Net SUMX - SUMX(VALUES(HH[Date]), [Net Total Hours])
If this works for you, mark it as the solution. Praise is also appreciated. Please let me know if you don't.
Best regards
Pat
Estyfodense - 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
Also, these might help, a couple of quick measures I have created over the years that work with hours:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Hour-Breakdown/m-p/625085#M306