Skip to main content

Celonis Product Documentation

MOVING_STDEV
Description

This function calculates the standard deviation for each window. It can be applied to INT or FLOAT columns.

Syntax
 MOVING_STDEV ( table.column, start, end )
NULL handling

NULL values are ignored, so they do not influence the result. If all the values of a group are NULL, the result for this group is also NULL.

Examples

[1]

Standard deviation for current row and one row above.

Query

Column1

         "Table1"."MONTH"
        

Column2

         MOVING_STDEV ( "Table1"."INCOME" , - 1 , 0 )
        

Input

Output

Table1

MONTH : int

INCOME : int

1

100

1

300

2

400

3

300

4

500

Result

Column1 : int

Column2 : float

1

null

1

141.42

2

70.71

3

70.71

4

141.42

[2]

Standard deviation for current row and one row above with null values.

Query

Column1

         "Table1"."MONTH"
        

Column2

         MOVING_STDEV ( "Table1"."INCOME" , - 1 , 0 )
        

Input

Output

Table1

MONTH : int

INCOME : int

1

null

1

null

2

400

3

300

4

500

Result

Column1 : int

Column2 : float

1

null

1

null

2

null

3

70.71

4

141.42

[3]

Standard deviation for current row and one row above. A FILTER is applied, such that only rows with an INCOME value less than 500 are taken into account.

Query

Filter

         FILTER "Table1"."INCOME" < 500;
        

Column1

         "Table1"."MONTH"
        

Column2

         MOVING_STDEV ( "Table1"."INCOME" , - 1 , 0 )
        

Input

Output

Table1

MONTH : int

INCOME : int

1

null

1

null

2

400

3

500

4

300

Result

Column1 : int

Column2 : float

2

null

4

70.71

See also: