Forum Discussion
abeirne
Helper II
4 years agoCalculating weekly overtime
Hi I am looking to calculate over time for a group of employees. I have my hours worked, a caluclated column which is DIVIDE((('Employee_Time'[Clock Out Date] - 'Employee_Time'[Clock in Date] * 1,44...
- 4 years ago
abeirne , Try a measure like
new column = datediff('Employee_Time'[Clock in Date], 'Employee_Time'[Clock Out Date],second)/3600.0new measure = sumx(addcolumns(summarize(Table, Table[Emp], Table[Week num], "_1", sum(Table[New column])), [_2], if([_1]>40, [_1]-40,blank())),[_2])
amitchandak
Super User
4 years agoabeirne , Try a measure like
new column = datediff('Employee_Time'[Clock in Date], 'Employee_Time'[Clock Out Date],second)/3600.0
new measure = sumx(addcolumns(summarize(Table, Table[Emp], Table[Week num], "_1", sum(Table[New column])), [_2], if([_1]>40, [_1]-40,blank())),[_2])
abeirne
Helper II
4 years agoThe column is a lot easier, thank you. Would you be able to explain the measure for me a little more? I don't understand the _2 part.
Thank you