Returns the nth previous cell member from mbrName, in the sequence XrangeList. All other dimensions assume the same members as the current member. @PRIOR works only within the designated range, and with level 0 members.


@PRIOR (mbrName [, n, XrangeList])
Parameter Description


Any valid single member name or member combination, or a function that returns a single member or member combination.


Optional signed integer. Using a negative value for n has the same effect as using the matching positive value in the @NEXT 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 tagged as Time in the database outline.


Optional parameter specifying a sequential range of members. If a range is not specified, Essbase uses the level 0 members from the dimension tagged as Time.

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 in the topic Range and Financial Functions.


In this example, Prev Inventory for each month is derived by taking the Inventory value from the previous month. Since n is not specified, the default is 1, which provides the next prior member in the range. Since XrangeList is not specified, the level 0 members from the dimension tagged as Time are used (Jan,Feb,Mar,...).

"Prev Inventory" = @PRIOR(Inventory);

This example produces the following report:

                Jan     Feb     Mar     Apr    May    Jun
                ===     ===     ===     ===    ===    ===                       
Inventory      1100    1200    1000    1300   1300   1400
Prev Inventory  #MI    1100    1200    1000   1300   1300

The following example assumes a Year dimension is added to Sample Basic.

"Prev Sales" = @PRIOR(Sales, 2, @XRANGE("2011"->"Sep", "2012"->"Mar"));

The above calculation is performed across the following multidimensional range specified by XrangeList:


See Also