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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rebrow31
Helper I
Helper I

Earliest and Latest Time when period is over 2 days

I currently have production data that spans over the days. These days are split in to AM shifts (6am - 2pm), PM shifts (2pm - 10pm), and night shifts (10pm - 6am the following day). I'm having problems with the night shift data and finding the earliest and latest time because the night shift goes over 2 days. For example, I can have 100 lines of data for the night shift. The night shift starts 22/06/21 at 10pm and end 23/06/21 at 6am. In my data, this whole night shift comes under the report date of 22/06/21 (even though in real time it ends on 23/06/21). I need to retun the earliest time (which would be around 10:01pm) and return the latest time (around 05:59am) however Power BI is getting confused and is returning the earliest start time as 12:01am (the next day) and then latest time as 11:59pm (the current day). Does any one know a way around this and getting what I need?

1 REPLY 1
Anonymous
Not applicable

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.