SELECTION OF DESCENDANTS / SELECCIÓN DE DESCENDIENTES

English (Español a continuación)

The following formulas select the descendants of a given member.

These formulas can be included in the outline.

  • In the next examples, we will include these formulas in the outline (in the member “Obj_2022”, of the dynamic dimension “Indicators”).

I.- Children

a) IsChild: Selects the children of the specified member.

Structure:

  • IsChild(“Member 1”, “Member 2”, [INCLUDEMEMBER])

Select those “Member 1” who are children of “Member 2”.

  • [INCLUDEMEMBER]: is optional; includes “Member 2” himself in the result.

Example:

  • IIF(IsChild([Markets].currentmember,Europe,INCLUDEMEMBER), Sales * 1.5, Sales * 1.3)

Calculate the value of the member “Obj_2022”:

  • Children of «Europe» (included): Multiplying their sales by 1.5
  • Other members of the «Markets» dimension: Multiplying their sales by 1.3

b) Children: Select the children of the specified member.

Structure:

  • Children(Member)

Example:

  • IIF(Contains([Markets].currentember,{Children([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.- Descendants

a) IsAncestor: Selects all the descendants of the specified member.

Structure:

  • IsAncestor(“Member 1”, “Member 2”, [INCLUDEMEMBER])

Select those “Member 2” who are descendants of “Member 1”.

  • [INCLUDEMEMBER]: Is optional; includes “Member 1” himself in the result.

Example:

  • IIF(IsAncestor([Europe], [Markets].currentmember), Sales * 1.5, Sales * 1.3)

Calculate the value of the member “Obj_2022”:

  • Descendants of «Europe» (excluded): Multiplying their sales by 1.5
  • Other members of the «Markets» dimension: Multiplying their sales by 1.3

b) Descendants: Select descendants of the specified member.

  • Depending on the parameters included in the formula, select those that belong to a certain level / generation, or all.

Structure:

  • Descendants(Member, [Layer / Index], [Specification])

Being:

Member: Determines the member of the dimension from which to get its descendants.

Layer / Index: It is optional and allows to define the level / generation of the descendants to be selected.

  • Layer: Can be a certain level or generation.
    • It can be specified with the name of the level / generation, or with the level / generation of a specific descendant.
  • Index: Number of generations below the member.

If this parameter is not included, this formula selects all the descendants (including the member itself).

Let’s see some examples: from the following outline:

The formula: “Descendants([Spain])”:

  • Select all the descendants of “Spain”.

The formula: “Descendants([Spain],[“Central Spain”].generation)”:

  • Select all the descendants of “Spain” that belong to the same generation as “Central Spain”.

The formula: “Descendants([Spain],[“Central Spain”].level)”:

  • Select all the descendants of “Spain” that belong to the same level as “España Centro”.

The formula: “Descendants([Spain],3)”:

  • Select all the descendants of “Spain” that are 3 generations below the generation of “Spain”.

Specification: This is optional and can only be used if a layer or index reference has been included. It supports various possibilities:

  • SELF: Selects the descendants in the specified layer / index.
  • AFTER: Selects the descendants below the specified layer / index.
  • BEFORE: Selects the descendants above the specified layer / index.
  • BEFORE_AND_AFTER: Selects the descendants above or below the specified layer / index.
  • SELF_AND_AFTER: Selects the descendants in the specified layer / index or below.
  • SELF_AND_BEFORE: Selects descendants in the specified layer / index or above.
  • SELF_BEFORE_AFTER: Selects the descendants in the specified layer / index, above or below.
  • LEAVES: Selects the descendants level 0 between the member and the specified layer / index

Let’s see an example:

  • Descendants([Spain],[“Central Spain”].level,”Specification”)

This formula selects the descendants of «Spain», taking as reference the level of “Central Spain» (Level 2). Depending on the «Specification» included, we will obtain the following results.

  • SELF: The descendants of «Spain» level 2.
  • AFTER: The descendants of «Spain» level 1 or lower.
  • BEFORE: The descendants of «Spain» level 3 or higher.
  • BEFORE_AND_AFTER: The descendants of «Spain» level 1 or lower, or level 3 or higher.
  • SELF_AND_AFTER: The descendants of «Spain» level 2 or lower.
  • SELF_AND_BEFORE: The descendants of «Spain» level 2 or higher.
  • SELF_BEFORE_AFTER: The descendants of “Spain”.

 Let’s see an example using this formula to determine target sales for the year 2022:

  • IIF(Contains([Markets].currentember,{Descendants([Spain],[“Central Spain”].level,SELF)}), Sales * 1.5, Sales * 1.3)

Calculate the value of the member “Obj_2022”:

  • Descendants of «Spain» at the same level as «Central Spain» (includes: «North Spain» and «Central 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

Español

Las siguientes fórmulas seleccionan los descendientes de un miembro determinado.

Estas fórmulas se pueden incluir en el outline.

  • 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.- Hijos

a) IsChild: Selecciona los hijos del miembro especificado.

Estructura:

  • IsChild(Miembro 1, Miembro 2, [INCLUDEMEMBER])

Selecciona los hijos del “Miembro 2”.

  • [INCLUDEMEMBER]: es opcional; incluye en el resultado al propio “Miembro 2”.

Ejemplo:

  • IIF(IsChild([Mercados].currentmember,Europa,INCLUDEMEMBER), Ventas * 1.5, Ventas * 1.3)

Calcula el valor del miembro “Obj_2022”:

  • Hijos 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) Children: Selecciona los hijos del miembro especificado.

Estructura:

  • Children(Miembro)

Ejemplo:

  • IIF(Contains([Mercados].currentember,{Children([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.- Descendientes

a) IsAncestor: Selecciona a todos los descendientes del miembro especificado.

Estructura:

  • IsAncestor(Miembro 1, Miembro 2, [INCLUDEMEMBER])

Selecciona aquellos “Miembros 2” que son descendientes del “Miembro 1”.

  • [INCLUDEMEMBER]: es opcional; incluye en el resultado al propio “Miembro 1”.

Ejemplo:

  • IIF(IsAncestor([Europa], [Mercados].currentmember), Ventas * 1.5, Ventas * 1.3)

Calcula el valor del miembro “Obj_2022”:

  • Descendientes del miembro “Europa” (excluido): Multiplicando sus ventas por 1,5
  • Resto de miembros de la dimensión “Mercados”: Multiplicando sus ventas por 1,3

b) Descendants: Selecciona descendientes del miembro especificado.

  • Según los parámetros incluidos en la fórmula selecciona aquellos que pertenecen a determinado nivel / generación, o a todos.

Estructura:

  • Descendants(Miembro, [Capa / Índice], [Especificación])

Siendo:

Miembro: Determina el miembro de la dimensión del que se van a obtener sus descendientes.

Capa / Índice: Es opcional y permite definir el nivel / generación de los descendientes que se van 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 descendiente concreto.
  • Índice: Número de generaciones por debajo del miembro.

Si no se incluye este parámetro, esta fórmula selecciona todos los descendientes del miembro (incluido).

Veamos unos ejemplos: a partir del siguiente outline:

La fórmula: “Descendants([España])”:

  • Selecciona todos los descendientes de “España”.

La fórmula: “Descendants([España],[“España Centro”].generation)”:

  • Selecciona todos los descendientes de “España” que pertenecen a la misma generación que “España Centro”.

La fórmula: “Descendants([España],[“España Centro”].level)”:

  • Selecciona todos los descendientes de “España” que pertenecen al mismo nivel que “España Centro”.

La fórmula: “Descendants([España],3)”:

  • Selecciona todos los descendientes de “España” que se encuentren 3 generaciones por debajo de la generación de “España”.

Especificación: es opcional y sólo se puede utilizar si se ha incluido referencia a capa o índice. Admite diversas posibilidades:

  • SELF: Selecciona los descendientes que se encuentran en la capa / índice especificado. 
  • AFTER: Selecciona los descendientes que se encuentran por debajo de la capa / índice especificado. 
  • BEFORE: Selecciona los descendientes que se encuentran por arriba de la capa / índice especificado. 
  • BEFORE_AND_AFTER: Selecciona los descendientes que se encuentran por arriba o por debajo de la capa / índice especificado. 
  • SELF_AND_AFTER: Selecciona los descendientes que se encuentran en la capa / índice especificado o por debajo. 
  • SELF_AND_BEFORE: Selecciona los descendientes que se encuentran en la capa / índice especificado o por arriba. 
  • SELF_BEFORE_AFTER: Selecciona los descendientes que se encuentran en la capa / índice especificado, por arriba o por debajo. 
  • LEAVES: Selecciona los descendientes de nivel cero que se encuentran entre el miembro y la capa / índice especificado

Veamos un ejemplo:

  • Descendants([España],[“España Centro”].level,”Especificación”)

Esta fórmula selecciona los descendientes de “España”, tomando como referencia el nivel del miembro “España Centro” (Nivel 2). En función de la “Especificación” que utilicemos obtendremos los siguientes resultados.

  • SELF: Los descendientes de “España” de nivel 2. 
  • AFTER: Los descendientes de “España” de nivel 1 o inferior.
  • BEFORE: Los descendientes de “España” de nivel 3 o superior.
  • BEFORE_AND_AFTER: Los descendientes de “España” de nivel 1 o inferior, o de nivel 3 o superior.
  • SELF_AND_AFTER: Los descendientes de “España” de nivel 2 o inferior.
  • SELF_AND_BEFORE: Los descendientes de “España” de nivel 2 o superior.
  • SELF_BEFORE_AFTER: Los descendientes de “España”.

Veamos un ejemplo de la utilización de esta fórmula para determinar las ventas objetivos del año 2022:

  • IIF(Contains([Mercados].currentember,{Descendants([España],[“España Centro”].level,SELF)}), Ventas * 1.5, Ventas * 1.3)

Calcula el valor del miembro “Obj_2022”:

  • Descendientes de “España” del mismo nivel que “España Centro” (incluye: “España Norte” y “España Centro”): 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

Anuncio publicitario