MEDIAN
The median of a column's numbers, blanks left out.
Group: Aggregation. Compatible with DAX.
Syntax
MEDIAN ( <column> )
| Parameter | Type | Description |
|---|---|---|
column | Column | The column whose middle value is wanted: numbers or dates. |
Returns
Number. The middle value of the column's values, blanks left out.
Remarks
- With an even number of values, it is the mean of the two in the middle.
- Unlike the mean, one very large or very small value hardly moves it.
- With no value in the filter context, the result is BLANK.
Examples
Prices per liter
Four prices, 30, 38, 52 and 64: the median is the mean of 38 and 52.
EVALUATE
ROW (
"Median price", MEDIAN ( Products[Price per liter] ),
"Mean price", AVERAGE ( Products[Price per liter] )
)
| Median price | Mean price |
|---|---|
| 45 | 46 |