English (Español a continuación)
Let’s see different structures to select members 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”).
a) By levels
IsLeaf: Selects the members of level 0 of a specific dimension.
Structure:
- IsLeaf(Dimension)
Example:
- IIF(IsLeaf([Markets].currentMember), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- For members of level 0 of the «Markets» dimension multiplying their sales by 1.5
- For the rest of members of the «Markets» dimension multiplying their sales by 1.3
IsLevel: Selects the members of a certain level of a specific dimension.
Structure:
- IsLevel(Dimension, Index)
Index: Specifies a certain level.
Example:
- IIF(IsLevel([Markets].currentMember, 1), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- For members of level 1 of the «Markets» dimension multiplying their sales by 1.5
- For the rest of members of the «Markets» dimension multiplying their sales by 1.3
b) By generations
IsGeneration: Selects the members of a given generation of a specific dimension.
Structure:
- IsGeneration(Dimension, Index)
Index: Specifies a particular generation.
Example:
- IIF(IsGeneration([Markets].currentMember, 2), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- For members of generation 2 of the «Markets» dimension multiplying their sales by 1.5
- For the rest of members of the «Markets» dimension multiplying their sales by 1.3
c) Same level/generation as a specific member
We can also select those members that belong to the same level or generation as a specific member.
The structure is:
- Ordinal(“Member 2”.Level) = Ordinal(“Member 1”.Level)
- Ordinal(“Member 2”.Generation) = Ordinal(“Member 1”.Generation)
Let’s see an example:
- IIF(Ordinal([Markets].currentMember.Level) = Ordinal([Germany].Level), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- For the members of the dimension «Markets» of the same level as «Germany», multiplying their sales by 1.5
- For the rest of members of the «Markets» dimension, multiplying their sales by 1.3
Let’s see another example:
- IIF(Ordinal([Markets].currentMember.Generation) = Ordinal([Germany].Generation), Sales * 1.5, Sales * 1.3)
Calculate the value of the member “Obj_2022”:
- For members of the «Markets» dimension of the same generation as «Germany», multiplying their sales by 1.5
- For the rest of members of the «Markets» dimension, multiplying their sales by 1.3
d) Selection of a certain member of the same level / generation
PrevMember: Selects the member immediately before the specified member following the order of the outline.
Two possible syntaxes:
- PrevMember(Member,[Layer])
- Member.PrevMember([Layer])
Layer: It is optional; determines the layer in which the preceding member is placed; can be LEVEL or GENERATION.
- If LEVEL is indicated, it will select the immediately preceding member within its same level, while if GENERATION is indicated, it will select it within its same generation.
- If it is not specified, it takes generation by default.
- If the member belongs to a “Multiple Hierarchies Enabled” dimension and the immediately preceding member belongs to a different hierarchy, this formula returns NULL.
NextMember: Selects the member immediately after the specified member following the order of the outline.
Two possible syntaxes:
- NextMember(Member,[Layer])
- Member.NextMember([Layer])
Layer: It is optional; determines the layer in which the member immediately after is located; can be LEVEL or GENERATION.
- If LEVEL is indicated, it will select the member immediately after within its same level, while if GENERATION is indicated, it will select it within its same generation.
- If it is not specified, it takes generation by default.
- If the member belongs to a “Multiple Hierarchies Enabled” dimension and the member immediately after it belongs to a different hierarchy, this formula returns NULL.
Let’s see some examples considering «Madrid» as the specified member:


Let’s see an example of this formula to determine the target sales for the year 2022:
- IIF(Contains([Markets].currentember,{PrevMember([Madrid],LEVEL)}), Sales * 1.5, Sales * 1.3)
Calculate the value of “Obj_2022”:
- The immediately preceding member of «Madrid» of the same level («Bilbao»): 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
Veamos distintas estructuras para seleccionar miembros 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”).
a) Por niveles
IsLeaf: Selecciona los miembros del nivel 0 de una dimensión.
Estructura:
- IsLeaf(Dimensión)
Ejemplo:
- IIF(IsLeaf([Mercados].currentMember), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Para los miembros de nivel 0 de la dimensión “Mercados” multiplicando sus ventas por 1,5
- Para el resto de los miembros de la dimensión “Mercados” multiplicando sus ventas por 1,3
IsLevel: Selecciona los miembros de un nivel determinado de una dimensión.
Estructura:
- IsLevel(Dimensión, Índice)
Índice: Especifica un nivel determinado.
Ejemplo:
- IIF(IsLevel([Mercados].currentMember, 1), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Para los miembros del nivel 1 de la dimensión “Mercados” multiplicando sus ventas por 1,5
- Para el resto de los miembros de la dimensión “Mercados” multiplicando sus ventas por 1,3
b) Por generaciones
IsGeneration: Selecciona los miembros de una generación determinada de una dimensión.
Estructura:
- IsGeneration(Dimensión, Índice)
Índice: Especifica una generación determinada.
Ejemplo:
- IIF(IsGeneration([Mercados].currentMember, 2), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Para los miembros de la generación 2 de la dimensión “Mercados” multiplicando sus ventas por 1,5
- Para el resto de los miembros de la dimensión “Mercados” multiplicando sus ventas por 1,3
c) Mismo nivel / generación que un miembro
Podemos también seleccionar aquellos miembros que pertenezcan al mismo nivel o generación que un miembro determinado.
La estructura es:
- Ordinal(“Miembro 2”.Level) = Ordinal(“Miembro 1”.Level)
- Ordinal(“Miembro 2”.Generation) = Ordinal(“Miembro 1”.Generation)
Veamos un ejemplo:
- IIF(Ordinal([Mercados].currentMember.Level) = Ordinal([Alemania].Level), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Para los miembros de la dimensión “Mercados” del mismo nivel que “Alemania”, multiplicando sus ventas por 1,5
- Para el resto de los miembros de la dimensión “Mercados”, multiplicando sus ventas por 1,3
Veamos otro ejemplo:
- IIF(Ordinal([Mercados].currentMember.Generation) = Ordinal([Alemania].Generation), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Para los miembros de la dimensión “Mercados” de la misma generación que “Alemania”, multiplicando sus ventas por 1,5
- Para el resto de los miembros de la dimensión “Mercados”, multiplicando sus ventas por 1,3
d) Selección de un miembro determinado del mismo nivel / generación
PrevMember: Selecciona el miembro inmediatamente anterior al miembro especificado siguiendo el orden del outline.
Dos posibles sintaxis:
- PrevMember(Miembro,[Capa])
- Member.PrevMember([Capa])
Capa: Es opcional; determina la capa en la que se sitúa el miembro anterior; puede ser LEVEL o GENERATION.
- Si se indica LEVEL seleccionará al miembro inmediatamente anterior dentro de su mismo nivel, mientras que si se indica GENERATION, lo seleccionará dentro de su misma generación.
- Si no se especifica toma por defecto generación.
- Si el miembro pertenece a una dimensión del tipo “Jerarquías activadas” y el miembro inmediatamente anterior pertenece a una jerarquía diferente, esta fórmula devuelve NULL.
NextMember: Selecciona el miembro inmediatamente posterior al miembro especificado siguiendo el orden del outline.
Dos posibles sintaxis:
- NextMember(Miembro,[Capa])
- Member.NextMember([Capa])
Capa: Es opcional; determina la capa en la que se sitúa el miembro posterior; puede ser LEVEL o GENERATION.
- Si se indica LEVEL seleccionará al miembro inmediatamente posterior dentro de su mismo nivel, mientras que si se indica GENERATION, lo seleccionará dentro de su misma generación.
- Si no se especifica toma por defecto generación.
- Si el miembro pertenece a una dimensión del tipo “Jerarquías activadas” y el miembro inmediatamente posterior pertenece a una jerarquía diferente, esta fórmula devuelve NULL.
Veamos algunos ejemplos tomando como miembro “Madrid”:


Veamos un ejemplo de utilización de esta fórmula para determinar las ventas objetivos del año 2022:
- IIF(Contains([Mercados].currentember,{PrevMember([Madrid],LEVEL)}), Ventas * 1.5, Ventas * 1.3)
Calcula el valor del miembro “Obj_2022”:
- Miembro inmediatamente anterior a “Madrid” de su mismo nivel (“Bilbao”): 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