MEDIAN
Syntax
MEDIAN (Dimension, Values, {Condition})
Description
The MEDIAN function returns the median of Values. If Condition is omitted, the function uses all Values. If Condition is included, the function uses only those Values for which Condition is true.
Returns
The median of Values. If Condition is omitted, the function uses all Values. If Condition is included, the function uses only those Values for which Condition is true.
Example
Suppose that a cube collection contains a data cube called SALES that uses dimensions called PEOPLE and MONTHS. It also contains a data cube called MEDIAN_OF_SALES that contains the following formula for calculating the median over time for each person:
MEDIAN(MONTHS, SALES)
The cube collection also contains a data cube called MEDIAN_OF_SALES_IN_FIRST_6_MONTHS that contains this formula:
MEDIAN(MONTHS, SALES, MEMBER(MONTHS) <= 6)