MicroStrategy ONE

Moving sum

Returns the moving sum of the current value and preceding values as defined in the function arguments. The calculations can be restarted based on attributes set in the function parameters.

Syntax

MovingSum

  • BreakBy is the attribute indicating where the calculation restarts.

  • SortBy is the attribute or metric by which the data is sorted.

  • Argument is metric representing a list of values.

  • WindowSizea positive integer indicating the number of values to sum in each calculation.

For additional information on and an example of this function, refer to the MicroStrategy Functions Reference.