Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have the following table x 600k rows
| Item ID | | Qty Picked | | Date Time | | Crew Name | |
ABC123 | 4 | 7/17/2022 2:05:16 PM | ? |
123DEF | 9 | 7/17/2022 7:05:16 PM | ? |
456XYZ | 6 | 87/18/2022 2:05:16 AM | ? |
I have 3 crews
Example: Today is July 15th
Crew 2 is Working on day shift
Crew 3 is Working on night shift
Crew 1 Rests while crew 2 and 3 work,
Day Shift - It`s a 12 hour shift Starting on Tuesday 6 AM finishing next monday at 6 PM.
Night Shift - It`s a 12 hour shift Starting on Friday 6 PM finishing next Friday at 6 AM.
While this happens the third Crew is resting From tuesday till friday and the cycle starts again.
My goal is to get KPIs like which crew processed more transactions, peak times, etc..
I have already solved whether is a "Night" shift or a "Day" shift with this code i found on this post, but i can`t figure out how to apply it to the crew name situation.
Use an external dates/calendar table that includes your crew schedules. Looks like that table needs to be set at half day granularity.
Thank you for your response.
I already have a DATE table on my schema, i would need to create a new one right?
So it would be like...Year -> Month -> Day -> Half day -> Hour -> Minute -> Second, a column for each one
i would have to add the crew name to the date manually then, right?
it is complicated to get it add it dynamically.
Thanks.
it would be like...Year -> Month -> Day -> Half day
No need to go deeper.