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

View all the Fabric Data Days sessions on demand. View schedule

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
Community Champion
Community Champion

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.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors