Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Shift model

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:

 

DataDataimage003.jpgDate TableDate 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")

2 REPLIES 2
rainer1
Resolver III
Resolver III

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!

 

 

 

 

 

 

Anonymous
Not applicable

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 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.