Mean (Simple Average)
The Average function computes the mean (or simple average) of a set of input values by calculating the total (sum) and deviding it by the number of values.
1. Syntax
AVG(d0,Alignments...)
2. Input
The Average function requires the following input:
- d0 - The set of data values for which the mean is calculated.
3. Parameters
The Average 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 averages calculated for each group: e.g., AVG($Quantity$, $Country$) calculates the average quantity for each country.
Tip
When using alignment parameters in a formula visualization, you can choose to display these averages grouped by only the alignment hierarchy values, for example to display just the average for each country without the original input values.
4. Output
The Average function generates the following output:
- A single value representing the mean of the input data values (or for each group when using alignment parameters).