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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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

5 REPLIES 5
RedBoxJJKW
New Member

A solution can be found here:

Groups Days and Create Shifts Column 

Anonymous
Not applicable

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.

v-juanli-msft
Community Support
Community Support

Hi @Anonymous

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

Anonymous
Not applicable

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

Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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