running-minimum

Returns the running minimum by row (including the current row) for a set of values. The "<for-option>" defines the scope of the function. The "at" option defines the level of aggregation and can be used only in the context of relational datasources.

Syntax

running-minimum ( numeric_expression [ at expression { ,
 expression } ] [ <for-option> ] [ prefilter ] )
running-minimum (  numeric_expression [ <for-option> ] [ prefilter ] )
<for-option> ::= for expression { , expression }|for report|auto

Example

running-minimum ( Qty )

Result

For each row, returns the quantity and a running minimum of the current and previous rows.

Result data

Name Qty Min Running-Minimum (Qty) for name
Smith 7 2 7
Smith 3 2 3
Smith 6 2 3
Smith 2 2 2
Wong 4 3 4
Wong 5 3 4