Table of contents
Collapse the table of content
Expand the table of content

MEDIANX Function (DAX)

Owen Duncan|Last Updated: 10/5/2018
1 Contributor

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

To return the median of numbers in a column, use MEDIAN Function (DAX).


MEDIANX(<table>, <expression>)  


tableThe table containing the rows for which the expression will be evaluated.
expressionThe expression to be evaluated for each row of the table.

Return Value

A decimal number.


The MEDIANX function takes as its first argument a table, or an expression that returns a table. The second argument is a column that contains the numbers for which you want to compute the median, or an expression that evaluates to a column.

Only the numbers in the column are counted.

Logical values and text are ignored.

MEDIANX does not ignore blanks; however, MEDIAN does ignore blanks


The following computes the median age of customers who live in the USA.

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

See Also

MEDIAN Function (DAX)

© 2018 Microsoft