Expressions: Derived Cube - DatePeriodCubeRange

You can do date period calculations using this function. For a banded date dimension, this will return a list comprising numeric values from the specified range in the Cube. Because a Cube can only return a numeric value, the DatePeriodCubeRange function cannot be the outermost in the Expression and is used in conjunction with other functions, such as SUM, MEAN, MIN, MAX, RANK to do different calculations.

For example, to calculate the relationship of this quarter to the maximum of any quarter this year:

Note

DatePeriodCubeRange([cube$0], “measure”, “dimension”, period)

Where:

• “measure” is the name of the measure, or the numeric index of the measure in the list of measures

• “dimension” is the name of the dimension referred to. It must be a banded date dimension where the date in each cell follows the previous one

• “periods” refers to one of the following values – “days”, “weeks”, “months”, “quarters”, “years”. A shortcut of the first letter also works – d|w|m|q|y

 

Click to return to Expressions: Derived Cube