@NEXTS

Returns the nth cell value from mbrName, in the sequence XrangeList. Provides the option to skip #MISSING, zero, or both #MISSING and zero values. Works within a designated range, and retains all other members identical to the current member.

Syntax

@NEXTS (SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH mbrName[,n,XrangeList])
Parameter Description

SKIPNONE

Includes all cells specified in the sequence, regardless of their content.

SKIPMISSING

Ignores all #MISSING values in the sequence.

SKIPZERO

Ignores all 0 values in the sequence.

SKIPBOTH

Ignores all #MISSING and 0 values in the sequence.

mbrName

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

n

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

Example

In this example, Next Cash for each month is derived by taking the Cash value for the following month and ignoring both #MISSING and zero values. Because n is not specified, the default is 1, which provides the next member in the range. Also, because XrangeList is not specified, the level 0 members from the dimension set as Time are used (Jan,Feb,Mar, ...).

"Next Cash" = @NEXTS(SKIPBOTH, Cash);

The following report illustrates the above example:

             Jan     Feb    Mar    Apr    May    Jun
             ===     ===    ===    ===    ===    === 
Cash         1100    #MI    1000   1300     0    1400 
Next Cash    1000    1000   1300   1400   1400    #MI   

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

FIX(East)
"Next Cash" = @NEXTS(SKIPNONE, 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