@NEXT

The @NEXT calculation function for Essbase returns a cell value at a given next distance from a member name within a range.

This function returns the nth cell value from mbrName, in the sequence XrangeList , retaining all other members identical to the current member. @NEXT cannot operate outside the given range.

Syntax

@NEXT (mbrName [, n, XrangeList])

Parameters

mbrName

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

n

Optional signed integer. If you do not specify n, then the default is set to 1, which provides the next member in the range. Using a negative value for n has the same effect as using the matching positive value in @PRIOR.

XrangeList

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.

Example

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

"Next Cash" = @NEXT(Cash);

This example produces the following report:

            Jan   Feb   Mar   Apr   May   Jun
            ===   ===   ===   ===   ===   ===                   
Cash        100    90   120   110   150   100
Next Cash    90   120   110   150   100   #MI

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

"Next Sales" = @NEXT(Sales, 1, @XRANGE("2011"->"Sep", "2012"->"Mar"));

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