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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
martinzierler
Frequent Visitor

Custom shift date filter

Hello,

 

I want to create a filter where I can select a date like 16.03.2022 and a shift.

1 Shift = 22:00:00 - 06:00:00

2 Shift = 06:00:00 - 14:00:00

3 Shift = 14:00:00 - 22:00:00

 

There is no problem with shift 2 and 3 but shift 1 gets a little bit tricky, because it includes data from the day before. 

So for example if the selected date is 16.03.2022 and the first Shift is selected, data from 15.03.2022 22:00:00 - 16.03.2022 06:00:00 should be displayed.

 

Also if I want to get the data from all three shifts, it should show everything from 15.03.2022 22:00:00 until 16:03.2022 22:00:00 if 16.03.2022 is selected. So the last 2 hours of the last day should be included and the las 2 hours of the selected day should be excluded.

 

Is something like this possible?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Pretend to have shifts from 12:00 am to 8:00 am, from 8:00 am to 4:00 pm, and from 4:00 pm to 12:00am.  Then in your measure do a trick and subtract two hours from the timestamp value. In decimals that would be 1/12th .   This is very similar to how you treat Fiscal Calendars.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Pretend to have shifts from 12:00 am to 8:00 am, from 8:00 am to 4:00 pm, and from 4:00 pm to 12:00am.  Then in your measure do a trick and subtract two hours from the timestamp value. In decimals that would be 1/12th .   This is very similar to how you treat Fiscal Calendars.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.