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

 

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

MEDIAN
 
 

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI