I'm using a sharepoint list so I converted all my dates to a field called datevalue which is the day in a number form. Example: Jan 01, 2019 = 20190101. I use this number to filter my list using the following formula.
This allows me to sum up the totals for everything in the period. However, I still need to figure out the total fuel used in the period because not everything will be captured in the app. To do this, I have a field called Odometer and I want to use the max of odometer (the last reading) and subtract that by the highest odometer reading from the period beforehand. Here is an example:
Jan 28 - 10
Jan 31 - 20
Feb 1 - 30
Feb 10 - 40
Feb 28 - 50
I want to build a formula that will give me 50 (feb 28 - max of odometer) -20 (Jan 31, the max before the period).