Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |