Returns the 50th percentile of an expression values in a table.
Table over which the Expression will be evaluated.
Expression to evaluate for each row of the table.
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.
Learn more about MEDIANX in the following articles:
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
Other related functions are:
Contributors: Alberto Ferrari, Marco Russo, Anders Bergmål
MSDN documentation: https://docs.microsoft.com/en-us/dax/medianx-function-dax