Downloads
DAXAggregationIntermediate

MEDIAN

Returns the middle value of the numbers in a column.

Syntax
MEDIAN(<column>)

Returns: A number (a scalar). BLANK when the column has no numbers in the current filter context.

What it does

MEDIAN returns the value in the middle of a column once the numbers are sorted. Half the values are above it and half below. Unlike AVERAGE, one very large value does not pull it up. Use it when the data has big outliers, such as invoice sizes where a few large contracts would distort the mean.

Syntax and arguments

Example

The collections manager wants the typical invoice size, because a handful of very large contracts make the average look much bigger than most customers see.

Median Invoice Value = MEDIAN(Sales[SalesAmount])

Compare this with AVERAGE(Sales[SalesAmount]) on the same card. A large gap between the two tells the reader the data is skewed, and that the median is the better guide to a normal transaction.

Example: a second, different use

A median of days to pay, as a measure of normal payment behavior for a client group:

Median Days to Pay = MEDIAN(Invoices[DaysToPay])

This assumes a column that holds the number of days from invoice to payment, calculated in the source or in a calculated column. The median is not shifted by one client that always pays late.

Things to watch

In business terms

Median is the right statistic for skewed money data: invoice size, customer balance, payment delay and claim cost. Finance teams use it to describe what a normal case looks like, and it reduces the risk that one large account drives a conclusion about all of them.

Related functions

All DAX functions · View as Markdown · DAX fundamentals