@ILDESCENDANTS

Returns the members of the specified member list and either all descendants of the members or all descendents down to the specified generation or level.

You can use the @ILDESCENDANTS function as a parameter of another function, where the function requires a list of members.

Syntax

@ILDESCENDANTS ((memberSetFunction) [,genLevNum])
ParameterDescription

memberSetFunction

A member set function that returns a list of members.

How the @ILDESCENDANTS function is used determines which member set functions are allowed. Follow these guidelines:

  • If the @ILDESCENDANTS function is used alone (not within a FIX statement), you must use the @LIST function and specify member names. For example:

    @LIST(mbr1,mbr2,...)
  • If the @ILDESCENDANTS function is used within a FIX statement, you can use member set functions such as @UDA and @ATTRIBUTE. For example:

    @UDA(dimName,uda)
    @ATTRIBUTE (attMbrName)

    In this case, you can choose whether to use the @LIST function. For example, both of the following statements are valid, and the statements return the same results.

    Example using only @ATTRIBUTE:

    FIX
    (@ILDESCENDANTS(@ATTRIBUTE(Caffeinated_True),@ATTRIBUTE(Ounces_12),"200-40"))
    ...
    ENDFIX;

    Example using @LIST and @ATTRIBUTE:

    FIX
    (@ILDESCENDANTS(@LIST(@ATTRIBUTE(Caffeinated_True),@ATTRIBUTE(Ounces_12),"200-40")))
    ...
    ENDFIX;

Caution!

All members of the specified member list must be from the same dimension.

genLevNum

Optional. The integer value that defines the absolute generation or level number up to which to select members. A positive integer defines a generation number. A value of 0 or a negative integer defines a level number.

Example

All examples are from the Sample.Basic database.

@ILDESCENDANTS(@LIST(“100”,"200”,"300”))

Returns 100 (a specified member); 100-10, 100-20, 100-30 (the descendants of 100); 200 (a specified member); and 200-10, 200-20, 200-30, and 200-40 (the descendants of 200); 300 (a specified member); and 300-10, 300-20, 300-30 (the descendants of 300).

@ILDESCENDANTS(@LIST(“Market”),-1)

Returns Market (the specified member); and East, West, South, and Central (the descendants of Market to level 1).

FIX
(@ILDESCENDANTS(@UDA(Market,"Major Market”)))
...
ENDFIX;

Returns East (a specified member); New York, Massachusetts, Florida, Connecticut, and New Hampshire (the descendants of East); Central (a specified member); Illinois, Ohio, Wisconsin, Missouri, Iowa, and Colorado (the descendants of Central); California and Texas (specified members, which do not have descendants).

FIX
(@ILDESCENDANTS(@ATTRIBUTE(Caffeinated_True)@ATTRIBUTE(Ounces_12),"200–40”))
...
ENDFIX;

Returns 100-10, 100-20, 200-10, 300-30 (caffeinated, 12-ounce drinks); and 200-40 (a specified member). None of these members have descendants.

See Also