Forum Discussion
Calculate Miles Driven per Vehicle
Hi sthaya,
I noticed when you first post me the picture, the data is ordered by the date:
So, you could notice my measure with index, it ranked by the date.
When you post me the latest picture, I noticed the data you have ordered by the [Gallons Total]:
I have tested it, when I ordered the data by [Date] column, then create the three measures, it could work on my side:
In short, I suggest you to order your data by the [Date] column firstly, then you could try to create the three measures to test if it could work.
Regards,
Daniel He
Daniel,
here's what it looks like when I sort by Date:
- farmerfrey6 years agoNew Member
All,
I'm new to PowerBI and DAX, so forgive me if the previous posts solved this problem but I still need some help.
I have a table with several different vehicles, [EquipmentID]. I need to be able to filter the table by equipment and come up with a 'Miles per Gallon' for each row. If there is anyone who could throw me a DAX formula for this problem I would greatly appreciate it!
Thanks