@IANCESTORS

Returns the specified member and either (1) all ancestors of the specified member or (2) all ancestors up to the 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

@IANCESTORS (mbrName [, genLevNum | genLevName])

mbrName Any valid single member name or member combination, or a function that returns a single member or member combination.
genLevNum 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.
genLevName Optional. Level name or generation name up to which to select the members.

Description

Analytic Services sorts the generated list of members as follows:

  1. the specified member
  2. the nearest ancestor of the member
  3. the next nearest ancestor of the member, and so on.

Using Sample Basic as an example, if you specify @IANCESTORS(200-30), Analytic Services returns 200-30, 200, Product (in that order). This order is important to consider when you use the @IANCESTORS member set function with certain forecasting and statistical functions.

Example

In the Sample Basic database:

@IANCESTORS("New York")

Returns New York, East, Market (in that order).

@IANCESTORS(Qtr4)

Returns Qtr4, Year (in that order).

@IANCESTORS(Sales,-2)

Returns Sales, Margin, Profit (in that order). Members higher than level 2 are not returned, as specified in the formula.

@IANCESTORS("100-10",1)

Returns 100-10, 100, Product (in that order). All ancestors are returned (up to generation 1), as specified in the formula.

See Also

@ANCESTORS, which excludes the specified member.
@IALLANCESTORS

©2004 Hyperion Solutions Corporation. All Rights Reserved.
http://www.hyperion.com