DAX function
MEDIAN — DAX function reference
Median of a column.
Syntax
dax
MEDIAN(<column>)
Examples
dax
MEDIAN(Sales[Amount])
→ A number
dax
CALCULATE(MEDIAN(Sales[Amount]), Sales[Region] = "West")
→ Median order value in the West region
dax
MEDIAN(Sales[Amount]) - AVERAGE(Sales[Amount])
→ Compares median to mean to gauge skew from outliers
Common mistakes & gotchas
- MEDIAN operates on a physical column only; there's no built-in MEDIANX, so getting the median of a per-row expression (like Qty × Price) requires materializing it first with ADDCOLUMNS and taking MEDIAN of that virtual column.
- Being a non-additive statistic (unlike SUM), MEDIAN can’t be pre-aggregated across visual levels — the median of medians is not the overall median, so a subtotal row won’t equal a simple combination of its children’s medians.
Related DAX functions
From Math & statistics