1. Calculation functions
  2. All Functions
  3. Logical Functions
  4. ISANCESTOR

Takes two list or time period-formatted parameters and tests whether:

  • the first list item is the ancestor of the second list item; or
  • the first time period is the ancestor of the second time period.

Ancestors are defined by the Top Level Item and Parent Hierarchy settings in the List configuration tab. The result is returned as a Boolean.

  • If first list item or time period is an ancestor of the second list item or time period, returns selected check box = TRUE
  • If first list item or time period is not an ancestor of the second list item or time period, returns unselected check box = FALSE

Syntax

ISANCESTOR(a,b) 

where:

  • a: Item to test as an ancestor of b
  • b: Item to test as descendant of a
ISANCESTOR(x,y)

where:

  • x: time period-formatted line item to test as an ancestor of y
  • y: time period-formatted line item to test as descendant of x

Back to Top

Format

Input Format Output Format

a: List

b: List

Boolean

Input Format Output Format

x: Time period

y: Time period

Boolean

Arguments

The function uses the following arguments when used with a list:

  • a:List-formatted line item or TimePeriod-formatted hard-coded date/date variable.
  • b:List-formatted line item or TimePeriod-formatted hard-coded date/date variable.

The function uses the following arguments when used with a time period:

  • x: Time period-formatted hard-coded date/date variable
  • y: Time period-formatted hard-coded date/date variable

Back to Top

Constraints

The function has the following constraints:

  • Source for each parameter must be list-formatted or TimePeriod-formatted.
  • Result must be Boolean formatted.

Excel equivalent

  • No Excel equivalent

Back to Top

Example

Use in conditional formula:

IF ISANCESTOR(Organization.North, ITEM(Organization))
THEN 

<... calculation for any location that rolls up into North ...>

ELSE

<... calculation for other locations ...>

If the relevant item in the Organization list structure has the North list item as its ancestor, then use the first calculation, otherwise use the second calculation.

Time period Example

Chosen Month and Chosen Quarter are time period-formatted source line items and Quarter is Ancestor is Boolean-formatted result:

ISANCESTOR(Chosen Quarter, Chosen Month)

Chosen Month is time period-formatted line item, the quarter refers to the time scale: Q3 FY14 is used, and Quarter is Ancestor Abs is Boolean-formatted result:

ISANCESTOR(TIME.'Q3 FY14', Chosen Month)

Back to Top

Similar functions