3 Replies Latest reply: Dec 12, 2012 6:38 AM by Dan V RSS


      I am calculating trailing average for the past 6 months measures dimension data using @MOVAVG function in a calcscript.
      I need to copy this resultant value to a scenario/variable for the period of next 3/6/12 months irrespective of the current month.

      Eg:Resultant avg value in june'12 = 10.
      This value of 10 needs to be copied for July'12, Aug'12 & Sept'12 to a scenario member.

      How can I implement this in the calcscript?
        • 1. Re: Essbase
          Dan V
          You can use the @MDShift Function on your period(month) dimension to reference forward/backward in that dimension
          • 2. Re: Essbase
            MDShift will move the values. Will it copy the single calculated value across a month range which is variable?
            • 3. Re: Essbase
              Dan V
              You could use the MDShift to reference past values.
              So, in your example:

              FIX(&CurrYear/*+ Rest of dimensions*/)
              IF(ISMBR(JAN:&CurrMonth)) /*Current Month is the month that you want to calculate the moving average for */
              @MOVAVG(/*logic for moving average goes here*/);
              @MDSHIFT("AC_XYZ",-1,Period /*Period is the dimension that has months so if yours is a different name, replace with that dimension*/),);