Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Lead
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Collapse the table of content
Expand the table of content

Lead (MDX)

Updated: 17 July 2006

Returns the member that is a specified number of positions following a specified member along the member's level.


Member_Expression.Lead( Index )

Member_Expression

A valid Multidimensional Expressions (MDX) expression that returns a member.

Index

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

Member positions within a level are determined by the attribute hierarchy's natural order. The numbering of the positions is zero-based.

If the specified lead is zero (0), the Lead function returns the specified member.

If the specified lead is negative, the Lead function returns a prior member.

Lead(1) is equivalent to the NextMember function. Lead(-1) is equivalent to the PrevMember function.

The Lead function is similar to the Lag function, except that the Lag function looks in the opposite direction to the Lead function. That is, Lead(n) is equivalent to Lag(-n).

Example

The following example returns the value for December 2001:

SELECT [Date].[Fiscal].[Month].[February 2002].Lead(-2) ON 0
FROM [Adventure Works]

The following example returns the value for March 2002:

SELECT [Date].[Fiscal].[Month].[February 2002].Lead(1) ON 0
FROM [Adventure Works]

Release History

17 July 2006

Changed content:
  • Updated syntax and arguments to improve clarity.
  • Added updated examples.

Community Additions

ADD
Show:
© 2015 Microsoft