@CURRMBRRANGE

Function

The @CURRMBRRANGE() function generates a member list that is based on the relative position of the current member being calculated.

Syntax

@CURRMBRRANGE(dimName, {GEN|LEV}, genLevNum, [startOffset], [endOffset])

dimNameName of the dimension for which you want to return the range list.
GEN|LEVDefines whether the range list to be returned is based on a generation or a level within the dimension.
genLevNumInteger value that defines the absolute generation or level number of the range list to be returned.
startOffsetDefines the first member in the range to be returned.
  • A null value returns the first member of the specified genLevNum.
  • An integer value returns the member name relative to the current member being calculated.
  • A negative value specifies a member prior to the current member being calculated in the dimension.
  • A value of 0 returns the name of the member currently being calculated.
  • A positive value specifies a member after the current member being calculated in the dimension.
endOffsetDefines the last member in the range to be returned.
  • A null value returns the last member of the specified genLevNum.
  • An integer value returns the member name relative to the current member being calculated.
  • A negative value specifies a member prior to the current member being calculated in the dimension.
  • A value of 0 returns the name of the member currently being calculated.
  • A positive value specifies a member after the current member being calculated in the dimension.

Notes

Examples

Example 1

Average Inventory is calculated by summing opening inventories from the first month of the year to the current period plus one period, and dividing the result by the number of periods to date plus one period. This calculation is accomplished by defining the @CURRMBRRANGE function within the rangeList parameter of the @AVGRANGE function.

"Average Inventory" = @AVGRANGE(SKIPNONE,"Opening Inventory",
@CURRMBRRANGE(Year, LEV, 0, , 1));

This example produces the following result:



                    Jan   Feb   Mar   Apr       Nov   Dec
Opening Inventory   100   110   120   130 . . . 200   210
Average Inventory   105   110   115   120 . . ..155   155 
Since a null value is specified for startOffset, the average operations always begin at the first member of the range list, Jan. The endOffset parameter, 1, specifies that the member after the current member being calculated is included in each average operation. So, for Average Inventory->Jan, the values for Jan and Feb are averaged; for

Example 2

Inventory Turnover is calculated by summing period-to-date Sales and dividing the result by the Average Inventory.

Turnover = @SUMRANGE(Sales,@CURRMBRRANGE(Year, LEV, 0, , 0))/"Average Inventory"

Which produces the following result:


                    Jan    Feb     Mar     Apr
Average Inventory   110    116.7   122.5   126
Sales                40     44      48      52
Turnover              0.36   0.72    1.08    1.46


Copyright (c)1991-2000 Hyperion Solutions Corporation. All rights reserved.