Aggregation types in Insight Explorer
The aggregation type of a metric describes how multiple values are aggregated into a single value. Insight Explorer requires the aggregation type in order to apply the correct methods to analyze the metric. The aggregation type often corresponds to the PQL function used in the formula of the metric, but this is not always the case. For example, an average can be written as either AVG ( … )
or COUNT ( … ) / COUNT ( … )
.
How the aggregation type is determined
Insight Explorer first tries to detect the aggregation type by parsing the PQL for the metric.
If Insight Explorer is able to detect the aggregation type, the dropdown is already populated for you.
If the PQL is too complex and Insight Explorer fails to determine the aggregation type with high confidence, you are prompted to select the aggregation type before adding the metric.
Aggregation types supported by Insight Explorer
Average
Sum
Median
Weighted Average
Special Handing of COUNT metrics
Metrics intended to count items are handled in the following way:
If a metric is of the form
COUNT ( … )
, Insight Explorer recognizes the metric as a sum.The PQL formula is transformed internally into
SUM ( CASE WHEN … IS NOT NULL THEN 1 ELSE 0 END )
– this maps null items in the inner expression to 1 and non-null items to 0, then applies a sum.The transformed PQL is displayed in Insight Explorer in the side panel during configuration. The Knowledge Model KPI is not affected at the source.
Insight Explorer does not support metrics of the form
COUNT ( DISTINCT … )
. For such metrics, check whetherDISTINCT
is necessary. See the examples from PQL performance optimization guide for more information.