4 Replies Latest reply on Aug 22, 2018 6:31 AM by rayvel.lopez

    Moving average for last 12 months

    rayvel.lopez

      Hey All

      Need a little help with Moving avg. I'm looking to compare my performance to
      last 12 months. So for each month I would like to get the avg amount for prior 12
      months and than get percentage diff.

      Please see below example:

       

      MonthsAmountMonthly AvgPerformance LOD
      September 2017$200$30251%
      October 2017$456$269-41%
      November 2017$358$302-16%
      December 2017$155$27376%
      January 2018$750$215-71%
      February 2018$0$275-100%
      March 2018$350$299-15%* If a month has no amount then the
        avg would be divide by 11 months
      April 2018$700$295-58%
      May 2018$650$328-50%
      June 2018$700$362-48%
      July 2018$300$41438%
      August 2018$1,000
      Totals

       

       

      My data structure is as follow

      Transaction
        Post Date
      Amount
      9/20/2017$0.00
      10/2/2017$30.00
      10/12/2017$10.00
      10/15/2017$25.00
      11/1/2017$17.00
      11/14/2017$10.00
      11/17/2017$0.00
      12/1/2017$100.00
      12/12/2017$15.00

       

      Thank you