The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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:
Stop | truck number | origin | destination | arrival date |
1 | 1 | A | B | 05-01-2022 |
2 | 1 | B | C | 10-01-2022 |
3 | 1 | C | D | 20-01-2022 |
4 | 1 | D | E | 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):
Origin | Destination | Diff Time | truck number |
A | B | 5 days | 1 |
A | C | 10 days | 1 |
A | D | 20 days | 1 |
A | E | 30 days | 1 |
B | C | 5 day | 1 |
B | D | 15 days | 1 |
B | E | 25 days | 1 |
C | D | 10 days | 1 |
C | E | 20 days | 1 |
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
@FreemanZ The calculation of diff time from all origins to amthe following X number of destinations
can you describe it with an example?
hi @fosterXO
Not sure about what you expect. Could you elaborate it, ideally with number?
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |