MicroStrategy ONE

Exponential weight running average

Returns the exponential weighted running average. The exponential weighted running average allows you compute a running average while placing more (or less) emphasis on recent data than on past data. The calculation can restart based on an attribute specified in the function parameters.

Syntax

ExpWghRunningAvgBreakBy = {}, SortBy = ()(Argument, Rate)

  •  

  • BreakBy is the attribute indicating where the calculation restarts.

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

  • Argument is a metric representing a list of numbers.

  • Rate is a positive real number specifying the base weight applied to each argument value. In the calculation exponents are sequentially applied to the rate value. Assign a rate of less than one to give greater emphasis to more recent data; assign a rate of greater than one to give greater emphasis to past data.

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