TupleRange

Returns the range of tuples between (and inclusive of) two tuples at the same level.

The range is created by identifying the level of the arguments and pruning the result set to include only the argument tuples and the tuples that are, in terms of outline order, between them.

Syntax

TupleRange ( tuple1, tuple2 )
ParameterDescription

tuple1

The first input tuple, marking the beginning of the range.

tuple2

The second input tuple, marking the end of the range.

Notes

Example

TupleRange can be useful if you have two Time dimensions. For example, the following expression averages a value for the range of months from Mar 2005 to Feb 2006, inclusive.

AVG (
  TUPLERANGE(
    ([2005], [Mar]), ([2006], [Feb])
  )
)

The values are averaged for the following range:

{([2005], [Mar]), 
 ([2005], [Apr]), 
 ([2005], [May]), 
 ([2005], [Jun]), 
 ([2005], [Jul]), 
 ([2005], [Aug]), 
 ([2005], [Sep]), 
 ([2005], [Oct]), 
 ([2005], [Nov]), 
 ([2005], [Dec]), 
 ([2006], [Jan]), 
 ([2006], [Feb])}