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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Shift table w/Date changed to (Datetime) starttime / endtime from Date - reference

Shift table changed from Date and shift columns due to 12 hour shifts 7am to 7pm, 7pm to 7am to columns (Date/Time format) startTime and endTime and shift column. Before it had a relationship to Date reference - date and Shift table - Date. How would I create the relationship for the Shift table after the change to get it working properly..Capture.PNG
2 REPLIES 2
Anonymous
Not applicable

We have 4 shifts (2 day shifts and 2 night shifts) and I want to query production losses by shift. It used to be the shift schedule was setup as Days - A/C shift and Nights - B/D Shift. I want to split it up into 4 separate shifts A, B, C ,D. Our data reference is setup by date only, not Date / Time. So when I create the relationship it duplicates A and C shift, and B and D duplicates the losses..

 

SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous, It depends on how you want to analyze the data. If your requirement/dashboard is based on the shift start time, create a datekey column based on starttime and use it in the relationship.

 

Date Key - YYYYMMDD

M Query -  Date.ToText([DateColumn], "yyyyMMdd")

DAX - FORMAT([DateColumn],"YYYYMMDD")

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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