What is the difference between Time sum and Moving SUm

Options
143kishornaidu
edited February 2023 in Modeling

Hi

I want to know what is the difference between Time sum and moving sum.

Scenarios that we use them individually

Answers

  • Hi @143kishornaidu ,


    Timesum : It is being used to summing up data for certain period of time for example you need a sum of data from particularly March to June then you can use Timesum to aggregate that. Secondly it is also used to aggregate data from a time dimension module to a without time dimension module.


    Movingsum : It is a forecasting method based on aggregation of last few months. It can only be used in the modules with Time dimension.


    Hope this helped!


    Thanks,

    Arnab

  • Hi @143kishornaidu,

    • MOVINGSUM: for obtaining a time range of data directly relative to the target period. Both source and target should have the same time dimensions. You specify the range using the relative number of periods. Very useful for calculating rolling sums, averages, maxes and mins, or checking if in the last/next few months there is ANY/ALL condition true (on booleans), or some text value is present. So when you need the answer/result in every period of your report/output.
    • TIMESUM: for obtaining a time range of data not directly relative to the target period. Should really only be used when the target module is not using the same time dimension as the source (or no time dimension at all). You can specify the range using the relative number of periods or exact date/period. It's really useful when you have some module without time (or on higher level) where you need to calculate something based on absolute start and end, like when user selects from when to when they want to calculate something and report doesn't need to have time dimension.

    So technically everything that MOVINGSUM does, can be done by TIMESUM, but the problem is, TIMESUM has worse performance. If you have some time, you can check this lighthearted 10-minute video about strengths and differences between these two functions: https://www.youtube.com/watch?v=PvimWuX5jVw