Determining Safe Miles Driven since last Vehicle Incident

WxShady13

Board Regular
Joined
Jul 24, 2018
Messages
184
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have an Excel Spreadsheet that has 2 tables on the same worksheet. One table is setup to capture the monthly odometer readings for each truck we have in service (i.e. Truck 660 would show 45,000 one month and then 47,000 next month). I have a Power BI equation to determine how many miles were driven each month for that table. I have a second table designed for Vehicle Incidents which also has an Odometer Reading column. I need to figure out how to determine how many miles have been driven since the last Vehicle Incident. I am using a MAX(Vehicle Incident [Date]) to get the actual last VI date, but I do not know how to calculate the miles driven from another table beyond that date. Thank you for the help.
 

Attachments

  • VI & ODO Readings.PNG
    VI & ODO Readings.PNG
    142.9 KB · Views: 7

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
not sure i read your tables correctly
i dont see a reading for the incident

do you use another set of columns each month - whats the difference in the BLUE to ORANGE
 
Upvote 0
Blue is the Normal Odometer Readings, Orange is the Vehicle Incident Readings.
 
Upvote 0
i would use MAX and bring back the Incident date and also the Last od date and mileage
using
an array MAX like this, based on the truck number - if not found will return zero 0
{=MAX(IF(($E$2:$E$20=J2),$F$2:$F$20))}
that matches the Truck number and returns the Date of incident
Truck number in E , Dates in F & odometer in G
{=MAX(IF((E2:E20=J2),G2:G20))}
returns the Odometer for truck

now you can just subtract the 2 odomenter readings

Then repeat for the latest Odometer reading

I have attached a sample on dropbox
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top