Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I would like to divide the work day into early (6 am- 2 pm), late (2 pm- 10 pm) and night shifts (10 pm- 6 am). As you can see in the pictures.
Creating the night shift is no problem because it runs every weekday from 10pm - 6 am. IIt is difficult to create the early and late shift, because they change every week. In calendar week 48 group A has the early shift (6 am- 14 pm) and group B the late shift (2 pm- 10 pm). In calendar week 49 group B has the early shift and group A the late shift and so on.
I would be very grateful for helpful tips!
Code:
Data
Date Table= Table.AddColumn(#"Renamed Columns4", "Schicht", each if [Zeitpunkt] <= #time(6, 0, 0) then "Nacht" else if [Zeitpunkt] <= #time(14, 0, 0) then "Früh" else if [Zeitpunkt] <= #time(22, 0, 0) then "Spät" else "Nacht")
Hi @Anonymous,
I think for me it's clear enough.
To Solve your Problem in Power query is realy hard - in Dax it would be a bit easier.
You don't need your calculated Dates column to solve it because you have the dates in the data Table.
The only Problem I have is how to decide if the person is in Group A or B.
Because of that i can't give you an exact solution.
May be you can share your table were the person is shown in which group he/she is.
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!
Hi @Anonymous ,
For me it is not clear what your question exactly is. For instance you refer to Group A or B but (as far as I can see) there is no reference to groups in the pictures provided.
It's always better to provide some sample data (not is a picture but as a table that can be copied into PBI) and a "sketch" of the desired result.
Jan
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |