MicroStrategy ONE
Moving difference
Returns the moving difference between current and preceding values. The position of the preceding row used in the calculation is defined in the functions arguments. The calculations can be restarted based on attributes set in the function parameters.
Syntax
MovingDifferenceBreakBy = {}, SortBy = ()(Argument, WindowSize)
-
-
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.
-
WindowSize is a positive integer indicating the range of values used to compute each difference.
For additional information on and an example of this function, refer to the MicroStrategy Functions Reference.