ISGENERATION

This formula returns 1 (Yes) or 0 (No) to indicate whether an element belongs to a specified generation. Like 'Level', 'Generation' describes the parent/child relationships in a hierarchy. But, unlike 'Level' , 'Generation' is zero-based and counts from the base elements of the hierarchy to the root.

For example, the Product hierarchy of the Analysis cube in the Best Practices sample database has these four levels:
Level name Level Generation
All 1 3
Product Group 2 2
Tire 3 1
Size 4 0

Syntax

where n is the number of the generation.

=MDX.GET(Database Alias, Cube, "IsGeneration("&"Element Unique name"&","&n&")")

Arguments to this function can be strings, or references to cells containing strings. If strings, they must be enclosed in quotes.