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])
- abeirne4 years ago
Helper II
The 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
- abeirne4 years ago
Helper II
I don't understand what the [_2] is supposed to be? Thanks
Measure =SUMX(ADDCOLUMNS(SUMMARIZE('dds Employee_Time_Tb', 'Payroll Date'[Week Num], "_1", SUM('dds Employee_Time_Tb'[Hours Worked 2])),[_2],IF([_1] > 40,[_1] - 40,BLANK())),[_2])