AVERAGEA
The mean of a column's values, text counting as 0, TRUE as 1 and FALSE as 0.
Group: Aggregation. Compatible with DAX.
Syntax
AVERAGEA ( <column> )
| Parameter | Type | Description |
|---|---|---|
column | Column | The column to average; it may hold numbers, text or TRUE and FALSE. |
Returns
Number. The mean of the column's values, where text counts as 0, TRUE as 1 and FALSE as 0.
Remarks
- Blank cells are still left out; only text and logical values are turned into numbers.
- On a column of numbers it gives the same answer as
AVERAGE. - It exists for workbooks and models that came from Excel's AVERAGEA. In a new model,
AVERAGEorAVERAGEXusually says more plainly what is meant.
Examples
A column of numbers
With numbers only, AVERAGEA and AVERAGE agree; the two unpriced holdings are left out by both.
EVALUATE
ROW (
"AVERAGEA", AVERAGEA ( Holdings[Price] ),
"AVERAGE", AVERAGE ( Holdings[Price] )
)
| AVERAGEA | AVERAGE |
|---|---|
| 97.0966666666667 | 97.0966666666667 |
A column of text
Every product name counts as 0, so the mean is 0.
EVALUATE
ROW ( "Mean of names", AVERAGEA ( Products[Product] ) )
| Mean of names |
|---|
| 0 |