Forum Discussion
Drobinson1
9 years agoHelper III
overtime calculation
I am trying to calculate overtime by day and then have the column total up correctly. Right now I have a measure that if the total hours worked for the day is greater than 8 then total the hours...
- 9 years ago
Hi Anonymous,
The formula works fine for me without any error. Here is the sample pbix file for your reference:smileyhappy:
Regards
Anonymous
9 years agoNot applicable
v-ljerr-msft I saw that you didn't have the item "TotalHoursHund" in your original table. Which means "TotalHoursHund" got created within your new measure "OT". Didn't you get the error message saying that it can't find an item called "TotalHoursHund" when you type in the formula for "OT"?
OT =
CALCULATE (
SUMX (
SUMMARIZE (
RC_AoD_EmployeeSummsByFilekey,
RC_AoD_EmployeeSummsByFilekey[Employee],
RC_AoD_EmployeeSummsByFilekey[Date],
RC_AoD_EmployeeSummsByFilekey[Location],
"TotalHoursHund", SUM ( RC_AoD_EmployeeSummsByFilekey[Hourshund] )
),
IF ( [TotalHoursHund] > 8, [TotalHoursHund] - 8, 0 )
)
)v-ljerr-msft
9 years agoMicrosoft Employee
Hi Anonymous,
The formula works fine for me without any error. Here is the sample pbix file for your reference:smileyhappy:
Regards