Databases Reference
In-Depth Information
Let's take a look at some of the commonly used member set functions:
•
@CHILDREN()
: Returns the list of all of the children of the member named
in the parameter.
Syntax:
@CHILDREN(mbrname)
Example:
@CHILDREN("Detroit");
Returns all members that are children of the member
Detroit.
•
@SIBLINGS()
: Returns the list of all siblings (members at the same level
and with the same parent) for the member specified in the parameter.
Syntax:
@SIBLINGS(mbrname)
Example:
@SIBLINGS("Illinois");
Returns all siblings of the member
Illinois
.
Range (Financial)
In the Range functions, you can code a range of members as an argument. You can
then SUM or AVERAGE the range for a new value.
•
@SUMRANGE()
: Used to sum the values for a given range of members
where
mbrname
is the member which will contain the summed values.
Syntax :
@SUMRANGE(mbrname, Rangelist)
Example:
@SUMRANGE(Sales, @DESCENDANTS(2009));
Returns the sum of Sales for all descendants of the year = 2009.
•
@AVGRANGE()
: Used to calculate the average values for a specified range.
As you remember in the
@AVG
function, we talked about
SKIPNONE
,
SKIPMISSING
,
SKIPZERO
, and
SKIPBOTH
parameters and their purpose
holds true for the
@AVGRANGE()
function as well.
Syntax:
@AVGRANGE( SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH , MBRNAME,
[RANGELIST] )
Example:
@AVGRANGE(SKIPMISSING, Sales, @DESCENDANTS(2009));