GLOBAL
Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6
Description
In general, only one aggregation is calculated for a query. With a global aggregation it is possible to calculate an additional aggregation function over all values of a column.
GLOBAL calculates an aggregation function for an aggregation to which all values are aggregated into one group.
Like normal aggregations, a global aggregation function take filters and selections into account. Values which are filtered out are not part of the result. Therefore if a filter or a selection is changed, every global aggregation function is recalculated.
Syntax
GLOBAL ( aggregation )
aggregation: The aggregation function including its parameters to use. Can be one of:
AVG (table.column)
COUNT DISTINCT (DISTINCT table.column)
COUNT_TABLE (table.column)
COUNT (table.column)
MAX (table.column)
MEDIAN (table.column)
MIN (table.column)
QUANTILE (table.column, quantile)
STDEV (table.column)
SUM (table.column)
TRIMMED_MEAN (table.column)
VAR (table.column)
Note
The result of GLOBAL can not be used as a grouper column for an aggregation.
Like the standard aggregation functions, GLOBAL can not be used inside a FILTER statement.
Examples
[1] Calculating the sum for two groups and the count for one group. |
[2] Calculating the sum for two groups and the count for one group as a result of a filter. |
[3] For each row, return 1 if the value is greater than the global average value (5) of that column. |