@SHIFTMINUS

Can be used in place of @SHIFT, @PRIOR, or @NEXT to improve performance if the formula meets the following criteria:

  • The formula is being executed in CELL mode.

  • The formula has one of the following patterns:

    X = Y - @SHIFT(mbrName [,n, XrangeList])

    or:

    X = Y - @PRIOR(mbrName [,n, XrangeList])

    or:

    X = Y - @NEXT(mbrName [,n, XrangeList])

If these criteria are met, consider rewriting your formula using @SHIFTMINUS, which runs the formula in block mode to improve performance.

Syntax

@SHIFTMINUS (mbrName1, mbrName2 [,n, XrangeList])
Parameter Description

mbrName1

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

mbrName2

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

n

Optional signed integer. n must be a numeric value, not a reference, such as a member name. If you are using @SHIFTPLUS to replace the @NEXT function, use 1 as the value for n. If you are using @SHIFTPLUS to replace the @PRIOR function, use -1 as the value for n. Default value is +1.

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

The following example shows a formula using @SHIFT().

Sales = Loss - @SHIFT(Sales, 1);

Here is the formula using @SHIFTMINUS() to improve performance:

@SHIFTMINUS (Loss, Sales, 1)

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

FIX("South", "East")
Sales = @SHIFTMINUS (COGS, 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