Dynamic Average Calculation

I want to create a functionality where the end user will select a start and end month from a pick list and based upon the difference in months Anaplan will calculate the average revenue.
Revenue data is already available in the module in one of the line item.

Can this be achieved through MOVINGSUM() ? If yes, how do it convert the start and end month time value into numbers and put them as an argument in the function?

Best Answer

  • Prajjwal88
    Answer ✓

    Hi @AbhishekChatter ,

    Since you want to calculate the average revenue over a user-selected period, the Revenue line item must exist in a time-dimensioned module (e.g., DAT01.Revenue). Meanwhile, the target module, where the user selects the Start Month and End Month, does not have a time dimension.

    To calculate the average revenue for the selected period, you should use the TIMESUM() function instead of MOVINGSUM(), as TIMESUM() allows aggregation across a specified time range.

    The correct formula that you can use in your Target Module is:

    TIMESUM(DAT01.Revenue, Start Period, End Period, AVERAGE)
    


    As MOVINGSUM() is designed to work within a time-dimensioned module where calculations happen for each period separately. However, your requirement is to aggregate across a dynamic time range selected by the user, which TIMESUM() handles efficiently in a non-time-dimensioned module.

    Please see attached screenshots for reference:

    Hope this helps!