Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4
Description
This function calculates the number of distinct elements per group. Count Distinct can be applied on any data type.
Syntax
COUNT ( DISTINCT table.column )
Null handling
Null values are not counted. If all values of a group are null, the result for this group is 0.
Examples
Count distinct elements of the column.
Query
Column1
COUNT (DISTINCT "Table1"."Column1" )
Count the number grouped by country.
Query
Column1
"Table1"."Country"
Column2
COUNT (DISTINCT "Table1"."Values" )
Count the number of values mixed with nulls, grouped by country.
Query
Column1
"Table1"."Country"
Column2
COUNT (DISTINCT "Table1"."Values" )