cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

How do I Split time into shifts when it starts on previous date

How would I split/define the following work shifts

Example for Work Date - June 30, 2018

Shift times

  • 3rd; June 29, 2018 @  23:00:00 to June 30, 2018 @  06:59:59
  • 1st; June 30, 2018 @  07:00:00 to June 30, 2018 @  14:59:59
  • 2nd; June 30, 2018 @  15:00:00 to June 30, 2018 @  22:59:59

3rd shift is first

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: How do I Split time into shifts when it starts on previous date

Very difficult to say specifically without sample data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

That being said, the HOUR function returns a number between 0 and 23 so that's probably your best bet.


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Community Support
Community Support

Re: How do I Split time into shifts when it starts on previous date

Hi @sjschwab09

Is this close to your goal?

2.png

3rd1 = CONCATENATE(CONCATENATE([date]-1,"@"),TIME(23,0,0))
3rd2 = CONCATENATE(CONCATENATE([date],"@"),TIME(6,59,59))
1st1 = CONCATENATE(CONCATENATE([date],"@"),TIME(7,00,00))
1st2 = CONCATENATE(CONCATENATE([date],"@"),TIME(14,59,59))
2nd1 = CONCATENATE(CONCATENATE([date],"@"),TIME(15,00,00))
2nd2 = CONCATENATE(CONCATENATE([date],"@"),TIME(22,59,59))

Best Regards

Maggie

Highlighted
New Member

Re: How do I Split time into shifts when it starts on previous date

Sort of, however, I am trying to use that data to filter to a shift. 

 

Ex. a problems occured @

8/16/2018 11:15pm (which is our 8/17/18)

8/17/2018 02:00 am

8/17/2018 11:20pm

 

When filtered by day or shift the firse and second items should be 8/17/18 3rd shift and the third should be 8/18/18 3rd shift

Highlighted
Frequent Visitor

Re: How do I Split time into shifts when it starts on previous date

Did you every figure this out? I am having the same issue with a shift ending at 1AM and it is taking the start of the previous day.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors