These cookies provide us with information on how our websites are being used, to help us improve the quality and relevance of content we place on them. Additionally, they also allow us to show you embedded videos and remember your preferences and actions, so that the websites do not bother you with the same request repeatedly (e.g. filling a form to download a PDF file and provide feedback about such actions to our affiliated entities).
You are viewing our older product's guide. Click here for the documentation of GoodData Cloud, our latest and most advanced product.
MEDIAN
The MEDIAN function counts the statistical median - an order statistic that gives the middle value of a sample. If the middle falls between two values, the function returns average of the two middle values. Null values are ignored.
The MEDIAN function is especially useful in cases where a small set of outliers could drastically skew the average if calculated as a mean. MEDIAN can be used to aggregate facts in the same way as SUM, MAX, MIN, or AVG, but it also accepts metrics or entire metric expressions as arguments.
Syntax
Examples