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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Finding the duration between dates in a row

Good afternoon,

 

I am currently struggeling with a dataset in which each row has an individual timeline, i need to calculate the amount of time the truck waits as indicated with waiting 1 and waiting 2 in each row as shown below.

John2_0-1632820174500.png

Of course this is a rough draft quickly made in Excel, the real dataset simply has to many columns to calculate with the if function since in the full dataset there are also reasons for waiting. These reasons and events are not sorted either since different trucks have different structured timelines.

Is it possible in power BI to make a formula which calculates how long each truck waits by subtracting "Waiting 1" with the next chronological event?

Below is an example what i want:

John2_0-1632821941063.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable
3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Not very clear. Based on what I got a new column

 

next arrival time = minx(filter(Table, [ID] = earlier([ID]) && [Arrival] > earlier([Arrival])),[Arrival])

 

We basically need a arrival date time

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
Anonymous
Not applicable

I'm sorry i have worded the post wrong, i have updated it now. i want to have a new collumn in wich the waiting times are displayed by subtracting the closest date in the row.

Anonymous
Not applicable

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.