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
amondal
New Member

Analysis of multiple rows with continuous time data

I have a dataset of equipment delays that basically records the time when the equipment was not working due to various kinds of delays or errors. Now there might be an instance where the shutdown was for 4 hours but the instance was recorded in two rows which add up to account for that complete instance. For example: If the machine was shut down from 2 PM to 6 PM, the data I have shows that the machine was shut down from 2 PM to 4 PM, and a new row shows that the machine was also shut down from 4 PM to 6 PM. This same thing can also happen across days. Attaching a sample table to show how the data is:

Delay MachineShiftFrom TimeTo DelayAgencyDelay TypeProblemArea
DateTimeTime
1/1/2021HR Slitter # 1A7:00:0015:00:00480RAW MATERIALDOWN TIMEOTHEROTHER
1/1/2021HR Slitter # 1B15:00:0017:30:00150RAW MATERIALDOWN TIMEOTHEROTHER
1/1/2021HR Slitter # 1B17:30:0017:55:0025CUTTER SETTINGDOWN TIMECUTTER SETTINGCUTTER SECTION
1/1/2021HR Slitter # 1B22:30:0022:55:0025CUTTER SETTINGDOWN TIMECUTTER SETTINGCUTTER SECTION
1/2/2021HR Slitter # 1A12:15:0012:40:0025CUTTER SETTINGDOWN TIMECUTTER SETTINGCUTTER SECTION
1/2/2021HR Slitter # 1B15:00:0015:25:0025CUTTER SETTINGDOWN TIMECUTTER SETTINGCUTTER SECTION

 

As you can see, the first three rows was a continuous shut down but broken down into multiple rows. I want to consolidate such multiple rows into 1 summarized row where the start time is the start time of the first row and the end time is the end time of the last such row. (In this case the row will have start time as 1/1/2021 7:00:00 and end time as 1/1/2021 17:55:00 

 

 

 

 

1 REPLY 1
lbendlin
Super User
Super User

Even though the agency is different?

 

How do you know it is a continuing outage?  Could be two independent outages that just happen to abut ?

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!

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