1 Reply Latest reply on Jul 13, 2016 8:39 AM by Aaron Lum

    How to calculate averages using relative date filter?

    Aaron Lum

      I'm recording a number of cycles and hours that a vehicle makes where each row records the number of cycles and hours in a single trip. I want to be able to show an average of the hours and cycles per month, relative to the date range that the user chooses with a relative date filter. i.e. if the user chooses a date range of the previous month, this table should only show the number of hours and cycles in that month. If the user chooses the previous year, the table should do the following calculation (sum of hours or cycles / 12 months).

      Currently, my Monthly cycles and Monthly hours fields are calculated fields using these calculations:

       

       

       

      Here is the relative date filter. I want the user to be able to select any relative date, and have a correct monthly average come up (i.e. total number of cycles or hours / number of months from relative date to today).

       

       

      Thank you so much for the help from this community!