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.


@ANCESTORS (mbrName [, genLevNum | genLevName])
Parameter Description


Any valid single member name or member combination (or a function that returns a single member or member combination).


Optional. 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.


Optional. Level name or generation name up to which to select the members.


The generated list of members is sorted starting with the nearest ancestor of the member, followed by the next nearest ancestor of the member, and so on. Using Sample Basic as an example, if you specify @ANCESTORS(200-30), Essbase returns 200, Product (in that order). This order is important to consider when you use the @ANCESTORS member set function with certain forecasting and statistical functions.


In the Sample Basic database:

@ANCESTORS("New York")

returns East, Market (in that order).


returns Year.


returns 100, Product (in that order).


returns Margin, Profit (in that order).

See Also