MicroStrategy ONE
RunningMin (Running Minimum)
Returns the running minimum value in a list of values by comparing current and preceding values. The evaluation can restart based on attributes identified in the parameter settings. This is an OLAP function.
Syntax
RunningMin <BreakBy, SortBy> (Argument)
Where:
BreakByis the attribute indicating where the calculation restarts.SortByis the attribute or metric by which the data is sorted.Argumentis a metric representing the list of numbers.
Expression
Where:
yi= metric value at the ith rown= number of rows/metric values
Example
This simple example illustrates how the RunningMinimum function walks through a list of values comparing each value to the lowest value identified so far and returning the minimum value as it progresses. The calculation is shown in the following table.
| Values | RunningMinimum |
|
8 |
|
|
6 |
6 (6<8) |
|
10 |
6 (6<10) |
|
9 |
6 (6<9) |
|
5 |
5 (5<6) |
