Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I am trying to automatically figure miles per gallon.

I have several records (state line crossings) of which some contain fuel purchases for that state. I have created a trailing grand summary part which contains totals of fuel purchased (gallons, etc) which works fine. I have also created a total miles field which is a calculation of the EndingMileage-StartingMileage fields. The AverageMPG field contains a calculation of TotalGallons/TotalMiles which also works fine.

Here is the problem. If I enter a fuel purchase in the first record only, it places the correct MPG in the AverageMPG field. If I do not enter a purchase in the first record but enter purchases in other records it enters a ? in the field. If I enter a purchase in the first record and also other records, it enters the AverageMPG as if the first record was the only fuel purchased thereby ignoring the other fuel purchases.

Fields...

TotalMiles Calculation EndingMileage-BeginningMileage

TotalGallons Summary =Total of FuelGallons (running)

AverageMPG Calculation Unstored =TotalMiles/TotalGallons

Thanks in advance for the help,

Charlie

I think there may be some confusion here in the combining of calculation fields with summary fields. The TotalMiles calculation operates on each record individually, while the TotalGallons summary includes all records in the found set (or subsummary part). Therefore, the AverageMPG calculation is the current record's mileage divided by the running total of FuelGallons for the found set (or subsummary, when in Preview Mode).

I think what you need is another summary field called Total of TotalMiles, defined to be a running total of the TotalMiles calculation. Use this in your AverageMPG calculation, instead of TotalMiles.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.