Forum Discussion
Nicci
Helper I
2 years agoGet total miles driven in a table
Hi Everyone, I have a table in power bi which is rows for each driving trip users enter. They only enter the ending mileage of the car. What I need to do is show in the table how many total miles dr...
- 2 years ago
Here is one example using a measure. Frankly, this could be a calculated column too.
- 2 years ago
I think a calculated column can solve a lot of your issues.
Try this:
Eff. Mileage = var em = [Ending Mileage] var veh = [VehicleID] var pem = maxx(filter(all(Mileage),[VehicleID]=veh && [Ending Mileage]<em),[Ending Mileage]) return em-COALESCE(pem,RELATED(Vehicles[StartingMileage]))
lbendlin
Super User
2 years agoI think a calculated column can solve a lot of your issues.
Try this:
Eff. Mileage =
var em = [Ending Mileage]
var veh = [VehicleID]
var pem = maxx(filter(all(Mileage),[VehicleID]=veh && [Ending Mileage]<em),[Ending Mileage])
return em-COALESCE(pem,RELATED(Vehicles[StartingMileage]))
Nicci
Helper I
2 years agoThat did the trick, THANK YOU !!!!!!!!!!!!!!!!