Forum Discussion
barbforsman
8 years agoResolver I
Overtime Calculation
This question has been asked several times, but I wasn't able to make any of the solutions provided fit my scenario. I have a table with the following data: Name, Date Worked, WeekEnding Date, Hour...
- 8 years ago
Thank you! I have posted the file here.
- 8 years ago
Hi barbforsman,
Could you try the OT formula as:
OT = if([HoursPerWeek]>40,[HoursPerWeek] - 40*[EmployeeCount],BLANK())
and see if that works in your scenario. - 8 years ago
Thank you!! That works great!!
- 8 years ago
hi barbforsman,
This measure also seems to work
OTHours = CALCULATE ( SUMX ( SUMMARIZE ( R550618NLK, [WeekEnding], [Name], "Overtime", MAX ( [HoursPerWeek] - 40, 0 ) ), [Overtime] ), ALL ( R550618NLK[Pay Type] ) )however I would also check it, especially if an employee job title could change during the week.
MarkS
8 years agoResolver IV
Hi barbforsman
Possibly try this Calculated Column:
OT Hours =
DIVIDE (
MAX (
CALCULATE (
SUM ( R550618NLK[Hours] ),
ALLEXCEPT ( R550618NLK, R550618NLK[Name], R550618NLK[WeekEnding] )
)
- 40,
0
),
CALCULATE (
COUNT ( R550618NLK[Hours] ),
ALLEXCEPT ( R550618NLK, R550618NLK[Name], R550618NLK[WeekEnding] )
)
)and see if this will work for you.
MarkS
8 years agoResolver IV
hi barbforsman,
This measure also seems to work
OTHours =
CALCULATE (
SUMX (
SUMMARIZE (
R550618NLK,
[WeekEnding],
[Name],
"Overtime", MAX ( [HoursPerWeek] - 40, 0 )
),
[Overtime]
),
ALL ( R550618NLK[Pay Type] )
)however I would also check it, especially if an employee job title could change during the week.