Applies to:  CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 

Description

VAR calculates the variance per group. Variance can be applied to INT or FLOAT columns.

Syntax

VAR ( table.column )

Null handling

Null values are ignored, meaning that they don't influence the result. If all values of a group are null, the result for this group is also null.

Examples


Variance of column.

Query
Column1
VAR ( "Table"."Column")
Input
Table
Column : INT
1
2
3
Output
Result
Column1 : FLOAT
1.0



Get the variance by country.

Query
Column1
"Table"."Country"
Column2
VAR ( "Table"."Values" )
Input
Table
Country : STRINGValues : INT
'US'
1
'DE'
4
'DE'
4
'FR'
5
'US'
2
'US'
3
Output
Result
Column1 : STRINGColumn2 : FLOAT
'DE'
0.0
'FR'
0.0
'US'
1.0



Get the variance with nulls, grouped by country.

Query
Column1
"Table"."Country"
Column2
VAR ( "Table"."Values" )
Input
Table
Country : STRINGValues : INT
'FR'
10
'FR'
null
'DE'
null
Output
Result
Column1 : STRINGColumn2 : FLOAT
'DE'
null
'FR'
0.0


  • No labels