MEDIANX Function (DAX)

How does the MEDIANX function (DAX) work?

Returns the median number of an expression evaluated for each row in a table.

Use MEDIAN function (DAX) to return the median of numbers in a column.

MEDIANX Formula Syntax

     <table>, <expression>

How do you use the MEDIANX function?

The MEDIANX function takes as its first argument a table, or an expression that returns a table. The second argument is a column containing the numbers you want the median to be computed for, or a column-evaluating expression.

Related Blog Posts

Related Support Forum Posts

Combining aggregating & iterating functions to calculate median
Total mean and median
Get Median Value by Patient (In correct result)

Considerations when using the MEDIANX function

Only the numbers are counted in the column.

Logical values and text are ignored.

MEDIANX does not ignore blanks but MEDIAN ignores blanks.

Related Video Tutorials


Formula examples using the MEDIANX function

    Sales,Sales[Sales Amount]

     FILTER(Customers, RELATED( Geography[Country]=”USA” ) ), Customers[Age]

Related DAX Functions

Related Course Modules

Center of Excellence


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide