AVERAGE
The mean of a column's numbers, blanks left out.
Group: Aggregation. Compatible with DAX.
Syntax
AVERAGE ( <column> )
| Parameter | Type | Description |
|---|---|---|
column | Column | The 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
AVERAGEXwithVALUE. - 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 price | Prices | Holdings |
|---|---|---|
| 97.0966666666667 | 3 | 5 |
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 |
|---|---|
| Depot | 0 |
| Shop | 11.8666666666667 |