Forum Discussion
Anonymous
3 years agoNot applicable
Creating Calculated Table with Shift Hours
Hi all, I have a dataset that looks like the one below. (Below is a sample of my real data): As you can see, for every unique employee and date combination, we have four sets of times. Shi...
- 3 years ago
Anonymous indeed, there are some misconderation and i have updated the reply. see if it is torwards the target.
FreemanZ
3 years agoSuper User
Hi Anonymous
try to create a table with:
SumTable =
ADDCOLUMNS(
SUMMARIZE(
TableName,
TableName[Date],
TableName[Emp Number]
),
"Shift Hours",
CALCULATE(MAX(TableName[Time]))-
CALCULATE(MIN(TableName[Time]))-1/48
)
i tried and it worked like this:
- Anonymous3 years agoNot applicable
Hi FreemanZ ,
I am trying the SUMMARIZE() approach but i think you misunderstood the shift hours thing. I think your logic prints the difference between the largest and smallest times in the entire dataset.
My shift hours logic is Shift End minus Shift Start minus 30 mins, where Shift Start and Shift End are times for each employee for that particular day. (see sample data I posted above).
Kind regards,
Midhun