Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Expand Minimize

IsGeneration (MDX)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns whether a specified member is in a specified generation.

IsGeneration(Member_Expression, Generation_Number) 

Member_Expression

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

Generation_Number

A valid numeric expression that specifies the generation against which the specified member is evaluated.

The IsGeneration function returns true if the specified member is in the specified generation number. Otherwise, the function returns false. Also, if the specified member evaluates to an empty member, the IsGeneration function returns false.

For the purposes of generation indexing, leaf members are generation index 0. The generation index of nonleaf members is determined by first getting the highest generation index from the union of all child members for the specified member, then adding 1 to that index. Because of how the generation index of nonleaf members is determined, a specific nonleaf member could belong to more than one generation.

Example

The following example returns TRUE if [Date].[Fiscal].CurrentMember is part of the second generation:

WITH MEMBER MEASURES.ISGENERATIONDEMO AS

IsGeneration([Date].[Fiscal].CURRENTMEMBER, 2)

SELECT {MEASURES.ISGENERATIONDEMO} ON 0,

[Date].[Fiscal].MEMBERS ON 1

FROM [Adventure Works]

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft