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

For loop Date Columns

Hi All,

 

I have equipment downtime data that is used to calculate Mean Time Between Failure and Mean Time To Repair.  The fleet management system creates a new event frame every time a crew shift change occurs, thus splitting one long event into multiple shorter events.  This skews the MTBF and MTTR data.

 

I need to calculate the start time of the next event that are of the same time code whi8le ingoring events with the same ending and starting time.

 

I have ranked the events according to Start Time and Equip ID and then calculated Next Start, but without looping through the data.

 

Power BI and Sample Data link:

 

https://drive.google.com/drive/folders/1jcL0CtZEuz4RrHiITiXmY_2ECyzt3CNL?usp=sharing

 

image.png

 

 

Next Start Calculated ColumnNext Start Calculated Column

 

This is one long event split into smaller segments:

 

image.png

1 REPLY 1
amitchandak
Super User
Super User

@robertoosthuize , Based on what I got.

Next start date will be , a new column

minx(filter(Table, [ID_eqip] = earlier([ID_eqip]) && [Start_date] > earlier([Start Date])),[Start Date])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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