@ANCESTORS

Function

The @ANCESTORS() function returns all ancestors of the specified member (mbrName) or those up to a specified generation or level. You can use this member set function as a parameter of another function, where that parameter is a list of members.

Syntax

@ANCESTORS (mbrName [, genLevNum | genLevName])

mbrNameAny valid single member name or member combination (or a function that returns a single member or member combination).
genLevNumOptional. An integer value that defines the absolute generation or level number up to which to select the members. A positive integer defines a generation number. A value of 0 or a negative integer defines a level number.
genLevNameOptional. Level name or generation name up to which to select the members.

Notes

Example

In the Sample Basic database:

@ANCESTORS("New York")

returns East, Market (in that order).

@ANCESTORS(Qtr4)

returns Year.

@ANCESTORS("100-10",1)

returns 100, Product (in that order).

@ANCESTORS(Sales,-2)

returns Margin, Profit (in that order).

See Also

@IANCESTORS, which includes the specified member.
@ISANCEST
@CHILDREN
@DESCENDANTS
@SIBLINGS


Copyright (c)1991-2000 Hyperion Solutions Corporation. All rights reserved.