lastPeriods

Returns the set of members from the same level that ends with "member". The number of members returned is the absolute value of "integer_expression". If "integer_expression" is negative, members following and including the specified member are returned. Typically used with a time dimension. This function appears in the Rolling and Moving Averages interactive sample report.

Syntax

lastPeriods ( integer_expression , member )

Example 1

lastPeriods ( 2 , [2006 Q 4] )

Result

Returns the last two members from the level that ends with 2006 Q 4.

Result data

2006 Q 3
2006 Q 4

Example 2

lastPeriods ( -3 , [2006 Q 4] )

Result

Returns the last three members from the level that starts with 2006 Q 4.

Result data

2006 Q 4
2007 Q 1
2007 Q 2