English (Español a continuación)
Let’s see different structures to select ancestors of a member to which to apply a certain condition.
- In the next examples, we will include the formulas in the outline (in the member “Obj_2022”, of the dynamic dimension “Indicators”).
I.- Parent
a) IsChild: Selects the parent of the specified member.
Structure:
- IsChild(Member 1, Member 2, [INCLUDEMEMBER])
Select Member 2 who is the parent of Member 1.
- [INCLUDEMEMBER]: Is optional; includes Member 1 itself in the result.
Example:
- IIF(IsChild([Europe],[Markets].currentmember,INCLUDEMEMBER), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- Parent of «Europe» (included): Multiplying their sales by 1.5
- Other members of the «Markets» dimension: Multiplying their sales by 1.3
b) Parent: Select the parent of the specified member.
Structure:
- Parent(Member, [Hierarchy])
Being:
- Member: Determines the member whose parent will be selected.
- Hierarchy: Is optional; it can be included in the “Time” dimension to specify a certain hierarchy.
Example:
- IIF(Contains([Markets].currentember,{Parent([Europe])}), Sales * 1.5, Sales * 1.3)
We obtain the same result as in the previous example with the difference that it does not include the member itself («Europe»).
II.- Ascendants
a) IsAncestor: Select all the ancestors of the specified member.
Structure:
- IsAncestor(Member 1, Member 2, [INCLUDEMEMBER])
Select those Members 1 who are ancestors of Member 2.
- [INCLUDEMEMBER]: Is optional; includes Member 2 itself in the result.
Example:
- IIF(IsAncestor([Markets].currentmember,[Europe] ,INCLUDEMEMBER), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- Ascendants of «Europe» (included): Multiplying their sales by 1.5
- Other members of the «Markets» dimension: Multiplying their sales by 1.3
b) Ancestor / Ancestors: These two formulas select ancestors of the specified member.
- Ancestor selects a single ancestor; Ancestors selects a set of ancestors.
- Depending on the parameter included in the formula, select that one/those that belong to a certain level/generation, or all of them.
b.1) Ancestor: Select the ancestor of the specified member located at a certain level / generation:
Structure:
- Ancestor(Member, [Layer / Index], [Hierarchy])
Being:
Member: Determines the member whose ascendant will be obtained.
Layer / Index: Defines the level / generation of the ascendant to be obtained.
- Layer: It can be a certain level or a certain generation.
- It can be specified with the name of the level / generation, or with the level / generation to which an outline member belongs.
- Index: Number of generations above the member.
Let’s see some examples: From the following outline:

The formula: “Ancestor([Bilbao],[“Germany”].generation)”
- Select “Spain” since it is the ancestor of “Bilbao” belonging to the same generation as “Germany”.
The formula: “Ancestor([Bilbao],[“Central Spain”].level)”
- Select “Northern Spain” since it is the ancestor of “Bilbao” belonging to the same level as “Central Spain”.
The formula: “Ancestor([Bilbao],3)”
- Select “Europe” since it is the ancestor of “Bilbao” located 3 generations above.
Hierarchy: is optional; it can be included in the “Time” dimension to specify a particular hierarchy.
b.2) Ancestors: Selects the ancestors of the specified member (included) between a certain level / generation and the member:
- Ancestors(Member, [Layer / Index])
Being:
Member: Determines the member whose ascendant will be obtained.
Layer / Index: Defines the level / generation, from which to the member, the ancestors will be selected.
- Layer: It can be a certain level or a certain generation.
- It can be specified with the name of the level / generation, or with the level / generation to which a certain member of the outline belongs.
- Index: Number of generations above the member.
Let’s see some examples: From the previous outline:
The formula: “Ancestors([Bilbao],[“Germany”].generation)”
- Select “Spain”, “Northern Spain” and “Bilbao” since they are the ancestors of “Bilbao” between the generation of “Germany” (Generation 3) and “Bilbao”.
The formula: “Ancestors([Bilbao],[“Central Spain”].level)”
- Select “Northern Spain” and “Bilbao” since they are the ancestors of “Bilbao” between the level of “Central Spain” (Level 3) and “Bilbao”.
The formula: “Ancestors([Bilbao],3)”
- Select “Europe”, “Spain”, “Northern Spain” and “Bilbao” since they are the ancestors of “Bilbao” from 3 generations above to “Bilbao”.
Let’s see an example of this formula to determine target sales for the year 2022:
- IIF(Contains([Markets].currentember,{Ancestors([Madrid],[“Germania”]. generation)}), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- Ascendants of «Madrid» between this member and «Spain» (same generation as «Germany»: generation 3) (includes: «Madrid», «Central Spain» and «Spain»): Multiplying their sales by 1.5
- Other members of the «Markets» dimension: Multiplying their sales by 1.3
Any question, please send an email to: essbaseeasy@gmail.com
Veamos distintas estructuras para seleccionar ascendientes de un miembro a los que aplicar una condición determinada.
- En los ejemplos que veremos incluiremos las fórmulas en el outline (en el miembro “Obj_2022”, de la dimensión dinámica “Indicadores”).
I.- Padre
a) IsChild: Selecciona al padre del miembro especificado.
Estructura:
- IsChild(Miembro 1, Miembro 2, [INCLUDEMEMBER])
Selecciona al Miembro 2 que es padre del Miembro 1.
- [INCLUDEMEMBER]: Es opcional; incluye en el resultado al propio Miembro 1.
Ejemplo:
- IIF(IsChild([Europa],[Mercados].currentmember,INCLUDEMEMBER), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Padre del miembro “Europa” (incluido): Multiplicando sus ventas por 1,5
- Resto de miembros de la dimensión “Mercados”: Multiplicando sus ventas por 1,3
b) Parent: Selecciona al padre del miembro especificado.
Estructura:
- Parent(Miembro, [Jerarquía])
Siendo:
- Miembro: Determina el miembro de la dimensión del que se va a obtener el padre.
- Jerarquía: Es opcional; se puede incluir en la dimensión “Tiempo” para especificar una jerarquía determinada.
Ejemplo:
- IIF(Contains([Mercados].currentember,{Parent([Europa])}), Ventas * 1.5, Ventas * 1.3)
Obtenemos el mismo resultado que en el ejemplo anterior con la diferencia de que no incluye al propio miembro (“Europa”).
II.- Ascendientes
a) IsAncestor: Selecciona a todos los ascendientes del miembro especificado.
Estructura:
- IsAncestor(Miembro 1, Miembro 2, [INCLUDEMEMBER])
Selecciona aquellos Miembros 1 que son ascendientes del Miembro 2.
- [INCLUDEMEMBER]: es opcional; incluye en el resultado al propio Miembro 2.
Ejemplo:
- IIF(IsAncestor([Mercados].currentmember,[Europa] ,INCLUDEMEMBER), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Ascendientes del miembro “Europa” (incluido): Multiplicando sus ventas por 1,5
- Resto de miembros de la dimensión “Mercados”: Multiplicando sus ventas por 1,3
b) Ancestor / Ancestors: Estas dos fórmulas seleccionan ascendientes del miembro especificado.
- Ancestor selecciona un único ascendiente; Ancestors selecciona un conjunto de ascendientes.
- Según el parámetro incluido en la fórmula selecciona aquel / aquellos que pertenecen a determinado nivel / generación, o a todos.
b.1) Ancestor: selecciona el ascendiente del miembro especificado situado en determinado nivel / generación:
Estructura:
- Ancestor(Miembro, [Capa / Índice], [Jerarquía])
Siendo:
Miembro: Determina el miembro de la dimensión del que se va a obtener el ascendiente.
Capa / Índice: Define el nivel / generación del ascendiente que se va a obtener.
- Capa: Puede ser un nivel determinado o una generación determinada.
- Se puede especificar con el nombre del nivel / generación, o con el nivel / generación al que pertenece un miembro del outline.
- Índice: Número de generaciones por encima del miembro.
Veamos unos ejemplos: a partir del siguiente outline:

La fórmula: “Ancestor([Bilbao],[“Alemania”].generation)”
- Selecciona “España” ya que es el ascendiente de “Bilbao” perteneciente a la misma generación que “Alemania”.
La fórmula: “Ancestor([Bilbao],[“España Centro”].level)”
- Selecciona “España Norte” ya que es el ascendiente de “Bilbao” perteneciente al mismo nivel que “España Centro”.
La fórmula: “Ancestor([Bilbao],3)”
- Selecciona “Europa” ya que es el ascendiente de “Bilbao” situado 3 generaciones por arriba”.
Jerarquía: Es opcional; se puede incluir en la dimensión “Tiempo” para especificar una jerarquía determinada.
b.2) Ancestors: Selecciona los ascendientes del miembro especificado (incluido) situados entre determinado nivel / generación y el miembro:
- Ancestors(Miembro, [Capa / Índice])
Siendo:
Miembro: Determina el miembro de la dimensión del que se van a obtener los ascendientes.
Capa / Índice: Define el nivel / generación a partir del cual, y hasta el miembro, se van a seleccionar los ascendientes.
- Capa: Puede ser un nivel determinado o una generación determinada.
- Se puede especificar con el nombre del nivel / generación, o con el nivel / generación al que pertenece un miembro determinado del outline.
- Índice: Número de generaciones por arriba del miembro.
Veamos unos ejemplos: a partir del outline anterior:
La fórmula: “Ancestors([Bilbao],[“Alemania”].generation)”
- Selecciona “España”, “España Norte” y “Bilbao” ya que son los ascendientes de “Bilbao” situados entre la generación de “Alemania” (Generación 3) y “Bilbao”.
La fórmula: “Ancestors([Bilbao],[“España Centro”].level)”
- Selecciona “España Norte” y “Bilbao” ya que son los ascendientes de “Bilbao” situados entre el nivel de “España Centro” (Nivel 3) y “Bilbao”.
La fórmula: “Ancestors([Bilbao],3)”
- Selecciona “Europa”, “España”, “España Norte” y “Bilbao” ya que son los ascendientes de “Bilbao” situados desde 3 generaciones por arriba hasta “Bilbao”.
Veamos un ejemplo de la utilización de esta fórmula para determinar las ventas objetivos del año 2022:
- IIF(Contains([Mercados].currentember,{Ancestors([Madrid],[“Alemania”]. generation)}), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Ascendientes de “Madrid” situados entre este miembro y “España” (misma generación que “Alemania”: generación 3) (incluye: “Madrid”, “España Centro” y “España”): Multiplicando sus ventas por 1,5
- Resto de miembros de la dimensión “Mercados”: Multiplicando sus ventas por 1,3
Cualquier consulta envía, por favor, un correo a: essbaseeasy@gmail.com