I'm trying to calculate the burn rate for each trip of a vehicle in a PowerBi Report.
I have an entry for each time a vehicle has refueled which has the odometer reading. It also has liters fueled.
The calculation itself is simple. kilometersTravelled/Litres*100 = Burn Rate for that trip.
I want to get the kilometers for that trip by subtracting the previous odometer reading for the same vehicle (identified by Registration number). How can I do this?
I would like to have a column called KMsTravelled = (previous odometer) - (current) odometer.
From this, I can the do the burn rate calculation in a new column and then build the rest of the report from there.
Please point me in the right direction? Very new to DAX.
Sample of my Data: