Forum Discussion
dcrow5378
Resolver I
2 years agoBreaking Punch In and Punch Out DateTime columns into shift categories
I have a dataset that has Employee, Date, Punch In, and Punch Out (DateTime) fields. I would like to break the punch in and punch out span into shift categories (Day, Evening, and Night Shift) based...
ToddChitt
Super User
2 years agoInstead of a matrix result like you have, I suggest you shoot for a classification of each punch as follows:
1) Isolate the TIME portion from the Date.
2) Create a calculated column that looks at TIME and write a nested IF statement in DAX to determine if it is DAY, EVENING or NIGHT.
Hope that helps.
Question, how would you classify someone that punched IN at 1000 and OUT at 1800?
dcrow5378
Resolver I
2 years agoIn the case of the 1000 in and 1800 out, they would have 4 Hours in "Day" and 4 Hours in "Evening".