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

MEDIANX(
     <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

What-Is-DAX-Why-Do-You-Need-To-Learn-It-1.2-Ultimate-Beginner-Guide-to-DAX

Formula examples using the MEDIANX function

= MEDIANX (
    Sales,Sales[Sales Amount]
)

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

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


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
Membership