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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
fosterXO
Frequent Visitor

Calculate date diff for all combinations

Hi 

I need to calculate the time it takes for trucks to go from one station to another so I can select any origin and destination in my dataset and calculate the average time for all or different trucks that did that route.

 

This is how the data could look like this. Assume truck 1 started on 00-01-2022:

 

Stoptruck numberorigindestinationarrival date
11AB05-01-2022
21BC10-01-2022
31CD20-01-2022
41DE

30-01-2022

 

We would need to get all the combinations from origin and destination for the following X destination for a particular origin. It would be great if it could ve a parameter so we say that we want the following table but only from a destination to the next X destinstions (in the example it would be x=4):

 

OriginDestinationDiff Timetruck number 
AB5 days1
AC10 days1
AD20 days1
AE30 days1
BC5 day1
BD15 days1
BE25 days1
CD10 days1
CE20 days1

 

And few more. Main question would be how to calculate all combinations for x stops in the future. The dataset is huge and I xan not calculate all stops for a truck 

4 REPLIES 4
fosterXO
Frequent Visitor

@FreemanZ The calculation of diff time from all origins to amthe following X number of destinations

can you describe it with an example?

The second table is the expected result. Thanks for your time @FreemanZ 

FreemanZ
Super User
Super User

hi @fosterXO 

Not sure about what you expect. Could you elaborate it, ideally with number?

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.