@RANGEFIRSTVAL
The @RANGEFIRSTVAL calculation function for Essbase returns the first data value in a member range, after skipping whatever empty value type is specified in the first parameter.
Syntax
@RANGEFIRSTVAL(SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH, mbrList)
Parameters
- SKIPNONE
-
Every cell value is considered as data.
- SKIPMISSING
-
#MISSING values are not considered as data.
- SKIPZERO
-
Zero (0) values are not considered as data.
- SKIPBOTH
-
Zero (0) and #MISSING values are not considered as data.
- mbrList
-
A valid member name, a comma-delimited list of member names, cross dimension members, or a member set function that returns a list of members from the same dimension. If you use the range operator or a function, the order of mbrList is dictated by the database outline order.
Notes
The function returns #MISSING when mbrList does not contain any value matching the criterion specified in the first argument.
Example 1
The following examples, based on the Sample.Basic cube, return the first non-#MISSING value found when sequentially looking up the values of members Jan, Feb, and Mar:
@RANGEFIRSTVAL(SKIPMISSING, @CHILDREN("Qtr1"));
or
@RANGEFIRSTVAL(SKIPMISSING, "Jan":"Mar");
or
@RANGEFIRSTVAL(SKIPMISSING, ("Jan","Feb","Mar"))
Example 2
Because member Jan does not have children, the following returns #MISSING:
@RANGEFIRSTVAL(SKIPZERO, @CHILDREN("Jan"));
Example 3
The following example returns the first non-#MISSING
and nonzero Actual value from Qtr1, using the outline order. All months have data, so the value for Jan is returned:
@RANGEFIRSTVAL(SKIPBOTH, @CHILDREN("Qtr1"));
Example 4
The following example returns the first non-#MISSING
and nonzero Actual value from the given list of months, using the order given in mbrList. All months have data, so the value for Feb is returned:
@RANGEFIRSTVAL (SKIPBOTH, (Actual->Feb, Actual->Mar, Actual->Jan ))
See Also