Skip to main content

Accessing Descendant Members

Accessing Descendant Members

You can use the DESCENDANTS function to obtain descendents of a given member, within one or more lower levels. For example, the following query gets all the descendents of the year 1990, within the [BirthD].[H1].[Period] level:

SELECT DESCENDANTS(birthd.1990,birthd.period) ON 1 FROM demomdx
 
 1 Jan-1990                               *
 2 Feb-1990                               2
 3 Mar-1990                               1
 4 Apr-1990                               1
 5 May-1990                               1
 6 Jun-1990                               *
 7 Jul-1990                               2
 8 Aug-1990                               2
 9 Sep-1990                               1
10 Oct-1990                               3
11 Nov-1990                               1
12 Dec-1990                               *

The DESCENDANTS function provides many options for accessing descendents within different parts of the hierarchy, but the preceding usage is the most common scenario.

FeedbackOpens in a new tab