Essbase @ILANCESTORS

Returns the members of the specified member list and either all ancestors
of the members or all ancestors up to the specified generation or level.

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

Syntax

@ILANCESTORS ((memberSetFunction) [,genLevNum])
Parameter Description
memberSetFunction A member set function that returns a list of members.

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

  • If the @ILANCESTORS 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 @ILANCESTORS 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(@ILANCESTORS(@ATTRIBUTE(Caffeinated_True),@ATTRIBUTE(Ounces_12),"200-40"))
    ...
    ENDFIX;

    Example using @LIST and @ATTRIBUTE:

    FIX(@ILANCESTORS(@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.

@ILANCESTORS(@LIST(“100–10”,"200–20”))

Returns 100-10 (a specified
member); 100 and Product (the ancestors of 100-10); 200-20 (a specified member);
and 200 (the ancestor of 200–20). The result does not contain duplicate
members.

@ILANCESTORS(@LIST(“100”,“100–10”))

Returns 100 and 100-10 (the
specified members); and Product (the ancestor of 100 and 100-10). The result
does not contain duplicate members.

@ILANCESTORS(@LIST(“100”,“Product”,“200”))

Returns 100, Product, and
200 (the specified members). The result does not contain duplicate members.

FIX(@ILANCESTORS(@UDA(Market,“New Market”)),2)
...
ENDFIX;

Returns Nevada (a member
that is assigned the New Market UDA) and West (the ancestor to generation
2 for Nevada); Louisiana (a member that is assigned the New Market UDA) and
South (the ancestor to generation 2 for Louisiana); and Colorado (a member
that is assigned the New Market UDA) and Central (the ancestor to generation
2 for Colorado).

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

Returns 100-10, 100-20, 200-10,
and 300-30 (caffeinated, 12-ounce drinks); and 200-40 (the specified member),
and 100, 200, 300, and Product (the ancestors of the members).

See Also

  • @LANCESTORS
  • @ANCESTORS
  • @IANCESTORS