# MEDIANXDAX Function (Statistical)

Returns the 50th percentile of an expression values in a table.

## Syntax

MEDIANX ( <Table>, <Expression> )
Parameter Attributes Description
Table

Table over which the Expression will be evaluated.

Expression

Expression to evaluate for each row of the table.

## Return values

Scalar A single variant value.

Median value

## Remarks

The behavior of MEDIANX and MEDIAN is different if the expressions return blanks, logical values, or text.

Expressions returning blanks are relevant to MEDIANX, whereas they are ignored by MEDIAN.

The result is blank in case there are no rows in the table returning a non-blank value.

When Expression returns an Integer, the resulting data type of MEDIANX is Variant (Integer for non-ties, Decimal for ties). Assigning a variant to a calculated column is not possible, so a type conversion is required in that case by using CONVERT.

## Related articles

Learn more about MEDIANX in the following articles:

• Statistical Patterns

DAX includes a few statistical aggregation functions, such as average, variance, and standard deviation. Other typical statistical calculations require you to write longer DAX expressions. Excel, from this point of view, has a much richer language. The Statistical Patterns are a collection of common statistical calculations: median, mode, moving average, percentile, and quartile. » Read more

## Related functions

Other related functions are:

Last update: Jan 11, 2021     » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Anders BergmÃ¥l

MSDN documentation: https://docs.microsoft.com/en-us/dax/medianx-function-dax

2018-2021 © SQLBI. All rights are reserved. Information coming from MSDN is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

# Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

# Row Context

This expression is executed in a Row Context. Click to read more.

# Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

# Not recommended

The use of this parameter is not recommended.

# Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

# Deprecated

This parameter is deprecated and its use is not recommended.

# DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

### Contribute

Want to improve the content of MEDIANX? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.