Forum Discussion
Calculate total hours worked
- 2 years ago
I figured it out.
Instead of using the TotalTime column which was a conversion fromTotalMinutes column, I just used TotalMinutes column. Example as follows
TotalMinutes 598.8 (decimal) converts to TotalTime 09:59 (text) with 09 being hours and 59 being minutes. I created a new column with the following dax formula
Total Time =VAR TotalMinutes = 'punch'[Total Minutes]RETURNFORMAT(QUOTIENT(TotalMinutes, 60), "0") & " hours " & FORMAT(MOD(TotalMinutes, 60), "0") & " minutes"which gave me an output of 9 hours 59 minutes.I created a measure using the same dax formula and was able to drop it on a card to get total hours worked in hours/minutes output. I then added 2 slicers, one for location and one for employee.There might be a better way of doing this but this is what I did to get it to work.
I figured it out.
Instead of using the TotalTime column which was a conversion fromTotalMinutes column, I just used TotalMinutes column. Example as follows
TotalMinutes 598.8 (decimal) converts to TotalTime 09:59 (text) with 09 being hours and 59 being minutes. I created a new column with the following dax formula
- Anonymous2 years agoNot applicable
Hi RussHaight ,
Thank you for providing the solution.
If the problem has been solved, please mark it as solution. if there is still a problem, please point it out and I will answer it for you as soon as possible.
Best Regards,
Adamk Kong