MicroStrategy ONE

RunningStDevP (Running Standard Deviation of a Population)

Returns the running standard deviation of a population for a value expression. The list of values supplied is the population. The calculation can restart based on attributes identified in the function parameter settings. This is an OLAP function.

Syntax

RunningStDevP <BreakBy, SortBy> (Argument)

Where:

  • 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 the list of numbers.

Expression

Where:

  • yi= metric value at the ith row
  • n = number of rows/metric values

Example

This example shows a report where the running standard deviation of the revenue is calculated. This calculation is based on the assumption that the list of values supplied in the metric represents the entire population of the data for which you want to obtain the standard deviation. The calculation starts over for each region, and the information is sorted within the region by state in ascending order.

Compare this example report to the example for RunningStDev to see the different values returned when calculating for a population as opposed to a sample.

The report contains the attributes Customer Region and Customer State, and the metrics Total Revenue, RunningStDevP, and StDevP. A report filter limits data to the Southwest, Southeast, and Northwest regions. The definition of the RunningStDevP metric is as follows:

RunningStDevP<BreakBy={[Customer Region]}, SortBy=<[Customer State])>([Total Revenue])