@PRIORS
The @PRIORS calculation function for Essbase returns a cell value at a given prior distance from a member name within a range, with options to ignore empty values.
The function returns the nth previous cell member from mbrName, in the sequence XrangeList, with options to skip #MISSING
, zero, or both #MISSING
and zero values. All other dimensions assume the same members as the current member. @PRIORS works only within the designated range.
Syntax
@PRIORS(SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH mbrName[,n, XrangeList])
Parameters
- SKIPNONE
-
Includes all cells specified in the sequence, regardless of their content.
- SKIPMISSING
-
Ignores all
#MISSING
values in the sequence. - SKIPZERO
-
Ignores all zero values in the sequence.
- SKIPBOTH
-
Ignores all
#MISSING
and zero values in the sequence. - mbrName
-
Any valid single member name, or a function that returns a single member.
- n
-
Optional signed integer. Using a negative value for n has the same effect as using the matching positive value in the @NEXTS function. If you do not specify n, then a default value of 1 is assumed, which returns the next prior member from the lowest level of the dimension set as Time in the database outline.
- XrangeList
-
Optional parameter specifying a sequential range of members. If a range is not specified, Essbase uses the level 0 members from the Time dimension.
Can be a valid member name, a comma-delimited list of member names, cross dimensional members, or a return value from a member set function or range function (including @XRANGE).
For more information about rangeList and XrangeList, see Range List Parameters.
Example
In this example, Prev Inventory for each month is derived by taking the Inventory value from the previous month and ignoring #MISSING
and zero values. Because n is not specified, the default is 1, which provides the next prior member in the range. Also, because XrangeList is not specified, the level 0 members from the dimension are set as Time used as (Jan,Feb,Mar,...).
"Prev Inventory" = @PRIORS(SKIPBOTH,Inventory);
The following report illustrates this example:
Jan Feb Mar Apr May Jun
=== === === === === ===
Inventory 1100 #MI 1000 1300 0 1400
Prev Inventory #MI 1100 1100 1000 1300 1300
The following example assumes a Year dimension is added to Sample Basic.
FIX(East)
"Prev Sales" = @PRIORS(SKIPBOTH,Sales, 1, @XRANGE("2011"->"Sep", "2012"->"Mar"));
ENDFIX;
The above calculation is performed across the following multidimensional range specified by XrangeList:
2011->Sep
2011->Oct
2011->Nov
2011->Dec
2012->Jan
2012->Feb
2012->Mar
See Also