MicroStrategy ONE

Running average

Returns the running average of the values in a list as it moves through the value list, adding the current value to the sum of the preceding values and dividing by the current count of values. The calculation can restart based on attribute groupings identified in the parameter settings. This is an OLAP function.

Syntax

RunningAvg(BreakBy = {}, SortBy = ()>(Argument)

  • 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.

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