@AVGRANGE
The @AVGRANGE calculation function for Essbase returns a member's average value across a range.
This function returns the average value of the specified member (mbrName) across the specified range (XrangeList).
Syntax
@AVGRANGE ( SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH, mbrName [, XrangeList])
Parameters
- SKIPNONE
-
Includes all cells specified in the average operation regardless of their content.
- SKIPMISSING
-
Excludes all values that are
#MISSING
in the average operation. - SKIPZERO
-
Excludes values of zero from the average calculation.
- SKIPBOTH
-
Excludes all values of zero or
#MISSING
from the average calculation. - mbrName
-
Any valid single member.
- XrangeList
-
Optional. A valid member name, a comma-delimited list of member names, cross dimension members, or a member set function or range function (including @XRANGE) that returns a list of members from the same dimension. If XrangeList is not specified, Essbase uses the level 0 members from the dimension tagged as Time.
Notes
This function accepts @ATTRIBUTE as a member range.
Example
The following example is based on the Sample Basic database. The calculation script determines the average sales of Colas in the West.
FIX(Sales)
West=@AVGRANGE(SKIPNONE,Sales,@CHILDREN(West));
ENDFIX
This example produces the following report:
Sales Colas Actual
Jan Feb Mar
=== === ===
California 941 899 927
Oregon 450 412 395
Washington 320 362 377
Utah 490 488 476
Nevada 138 137 138
West 467.8 459.6 462.6
The following example uses a cross-dimensional operator between two member functions to calculate the average of the children of a member across two dimensions.
@AVGRANGE(SKIPBOTH,"Sales",@CHILDREN(@CURRMBR("Product"))->@CHILDREN(@CURRMBR("Market")));
See Also