OpenBI Docs Buy

AVERAGE

The mean of a column's numbers, blanks left out.

Group: Aggregation. Compatible with DAX.

Syntax

AVERAGE ( <column> )
ParameterTypeDescription
columnColumnThe column to average: its numbers, or its dates.

Returns

Number. The arithmetic mean of the column's values that are not blank.

Remarks

  • Blank cells are left out of both the total and the count: a column of 3, blank and 5 averages 4.
  • When no value is left in the filter context, the result is BLANK rather than zero.
  • A text column is an error. To average text that holds numbers, use AVERAGEX with VALUE.
  • For the mean of an expression rather than of one column, use AVERAGEX.

Examples

The mean quoted price of the bonds

Two of the five holdings have no price, so the mean is taken over three.

EVALUATE
ROW (
    "Mean price", AVERAGE ( Holdings[Price] ),
    "Prices", COUNT ( Holdings[Price] ),
    "Holdings", COUNTROWS ( Holdings )
)
Mean pricePricesHoldings
97.096666666666735

Mean crates per shop, by kind of place

EVALUATE
SUMMARIZECOLUMNS (
    Places[Kind],
    "Mean crates", AVERAGE ( Places[Crates] )
)
ORDER BY Places[Kind]
Places[Kind]Mean crates
Depot0
Shop11.8666666666667

AVERAGEX, AVERAGEA, MEDIAN, SUM, COUNT.

Last updated · OpenBI Studio 0.3.74