Skip to main content
Version: I2024.2.x

Lag

The Lag function returns a member that precedes the specified member by a specified number of positions in its level.

Syntax

Member_Expression.Lag(Index)

Return Value

Returns the member that follows a specified member by a specified number of positions in the same level.

Input Parameters

Member_Expression
An MDX expression that returns a member.

Index
A numeric expression that specifies a number of member positions.

Examples

The following example returns the order quantity for 2011, given the specified member 2013.

SELECT
{
[Order Date Dimension].[Order Date Month Hierarchy].[Order YearMonth].[2010].Lag(2)
} ON 0 ,
{[Measures].[orderquantity1]} on 1
FROM [Internet Sales Cube]