Median
The Median function computes the middle value from a set of input values. If the number of values is even, the function computes the average of the two middle values.
1. Syntax
MEDIAN(d0,Alignments...)
2. Input
The Median function requires the following input:
- d0 - The set of data values for which the Median is calculated.
3. Parameters
The Median function accepts the following parameters:
- Alignments... (One or More, Optional) – Hierarchy placeholders to be used as the alignment axis. Input values are grouped by the specified hierarchy values, and the median calculated for each group: e.g., MEDIAN($Quantity$, $Country$) calculates the median quantity for each country.
Tip
When using alignment parameters in a formula visualization, you can choose to display these median values grouped by only the alignment hierarchy values, for example to display just the median for each country without the original input values.
4. Output
The Median function generates the following output:
- Median - A single value representing the median (or for each group when using alignment parameters).