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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate the difference between km for th same car

Hi everyone,

I would like to find an issue to look for the last "km d'arrivée" for the same car.

 

Here are my datas ("immatricultion" is the car plate reference, "kmde départ" and "kmdarrivée" are the km from the start and the end of the route, "datederetour" is the date when the user came back with the car) :

 

I would find out the difference between 132000 and 131487...one value per row to highlights the row which are wrong (difference not null).

Do you know what I mean? 😉 

I tried with summarize, with max, dateadd, earlier, filter...

 

Thank you for all your support,

Baptiste

1 ACCEPTED SOLUTION

@Anonymous 

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/Finding-the-previos-occurrence-within-same-table-based-on-o...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
VasTg
Memorable Member
Memorable Member

@Anonymous 

 

Could you post some sample data? Is my understanding correct?

 

PlateStartEndExpected Difference?
abc12319350204501100
xyz12354000550001000
Connect on LinkedIn
Anonymous
Not applicable

No, sorry,

My picture didn't appear, sorry.

 

Here is it :

Vehicule.png

@Anonymous 

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/Finding-the-previos-occurrence-within-same-table-based-on-o...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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