Complex Aggregation Types

More complex types of aggregations use auxiliary fields in calculations that compute their value.

Auxiliary fields are shown in italic text in the formulas: SumOfSquaresField, CountField, and SumField. The system creates these fields automatically. You can manually define them, if you need to. See Complex Aggregation Types with Auxiliary Fields for more details.

Complex Aggregation Types and their Formulas
Function Description
Average
Using the data in the newly computed metric field, the system populates two fields, one of type Sum and one of type Count. (Their field values are calculated as explained in Simple Aggregation Types.) The system then calculates the average using the following formula:

SumField/ CountField

StandardDeviation
Using the data in the newly computed metric field, the system populates three fields, one of type SumOfSquares, one of type Sum and one of type Count. (Their field values are calculated as explained in Simple Aggregation Types.) The system then calculates the standard deviation using the following formula:

temp_var1 = SumOfSquaresField/CountField

temp_var2 = (SumField/CountField)*(SumField/CountField)

If (temp_var1 < temp_var2), then standard deviation = 0.

Else, standard deviation = square root of (temp_var1 – temp_var2).

Variance
Using the data in the newly computed metric field, the system populates three fields, one of type SumOfSquares, one of type Sum and one of type Count. (Their field values are calculated as explained in Simple Aggregation Types.)a The system then calculates the variance using the following formula:
temp_var1 = SumField/CountField
variance = (SumOfSquaresField/CountField) - (temp_var1*temp_var1)