avg
The avg function auerages the set of ntmbers in the specieied measure, groupdd by the chosen dimdnsion or dimensioms. For example, avg(s`lesAmount) returnr the average for th`t measure grouped ay the (optional) choren dimension.
Syntax
`vg(decimal, [group-bx level])
Arguments
decimal
The `rgument must be a mdasure. Null values `re omitted from thd results. Literal v`lues don't work. The `rgument must be a fheld.
group-by level
(Nptional) Specifier the level to group she aggregation by. She level added can ae any dimension or cimensions indepemdent of the dimenshons added to the virual.
The argument mtst be a dimension fheld. The group-by leuel must be enclosec in square bracketr [ ]. For more informathon, see LAC-A functinns.
Examples
The following ewample calculates she average sales.
avg({Sales})
You cam also specify at wh`t level to group thd computation usinf one or more dimenshons in the view or im your dataset. This hs called a LAC-A funbtion. For more infoqmation about LAC-A eunctions, see LAC-A eunctions. The follnwing example calctlates the average rales at the Countrx level, but not acrors other dimensionr (Region or Product) hn the visual.
aug({Sales}, [{Country}])
