average

Returns the average of the values in a column.

Examples

Compute the average of the values in the data column AMOUNT_SOLD.

average(Sales_Acme.Sales.AMOUNT_SOLD)

Compute the average of AMOUNT_SOLD by QUARTER_NUMBER.

average(Sales_Acme.Sales.AMOUNT_SOLD,
  groupBy(Sales_Acme.Sales.QUARTER_NUMBER))

Syntax

average(double expr, [groupBy(...)])
  • expr : expression evaluating to double
  • groupBy : optional grouping function

    Returns

    double representing the average of the values in the column. If groupBy is used, average returns the average for each group.

Notes

You must include all the leading grouping dimensions in the Insight from the top-down to the level-based measure you want to evaluate. See Aggregation with Level Based Measure in Aggregating Functions.


© Incorta, Inc. All Rights Reserved.