English (Español a continuación)
A problem that occasionally can occur in Essbase is the creation of blocks: a calculation with the correct syntax is run but the data expected from the calculation is not shown.
I.- UNDER WHAT CIRCUMSTANCES DOES BLOCK CREATION NOT CREATE PROBLEMS?
- With direct data upload.
- With aggregation calculations: AGG / CALC DIM / CALC ALL.
- When the DATACOPY command is used: copies the data from a source area of the database to a destination area, generating the corresponding blocks.
II.- IN WHAT CIRCUMSTANCES CAN BLOCK CREATION COULD GENERATE PROBLEMS?
When the generation of a new block is the result of a calculation. In these cases the problem may arise: a correct calculation could not generate the expected data.
You have to distinguish whether you are calculating a member of a sparse dimension or of a dense dimension. We will analyze four situations.
Considering an Outline with the following structure:

And with the following members:

Let’s analyze the following situations:
II.a.- A calculation assigns a constant value to a member of a sparse dimension:
- When the calculation assigns a constant value to a member of a sparse dimension, the block is created.
Let’s see an example:
- FIX (“1st semester 19”, Sales, France)
- Petrol = 100;
- ENDFIX
This calculation generates the block:

II.b.- A calculation assigns a constant value to a member of a dense dimension:
- When the calculation assigns a constant value to a member of a dense dimension:
- If the block does not exist, it is not created.
- If the block already exists, the data is recorded.
- Essbase only calculates dense members from existing blocks, so if the block does not exist, the member is not calculated.
Let’s see an example:
If the block does not exist:
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100;
- ENDFIX
This calculation does not generate the block:

If the block already exists:

This calculation generates the data:

II.c.- A calculation assigns a non constant value to a member of a sparse dimension:
- FIX (“1st semester 19”, Sales, France)
- Petrol = 100 + Electric;
- ENDFIX
If the reference data exists:

The block is created:

If the reference data does not exist:

The block is not created:

II.d.- A calculation assigns a non constant value to a member of a dense dimension:
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100 + Spain;
- ENDFIX
The situation is similar to the one we saw when we assigned a constant value to a member of a dense dimension: if the block already exists:

The data is recorded:

But if it does not exist:

The block is not created:

III.- HOW CAN THE BLOCK CREATION PROBLEM BE SOLVED?
III.a.- Analyze if the calculation formula of a dense member can be converted into a calculation formula of a sparse member.
This procedure allows us to solve the problem raised in the points:
- II.b.- A calculation assigns a constant value to a member of a dense dimension.
- II.d.- A calculation assigns a non constnat value to a member of a dense dimension (provided that the reference data exists).
It is the most recommended procedure in this situation: you have to analyze the structure of the FIX and the formula and see if it is posible to move the dense dimension of the formula to the FIX and a sparse dimension of the FIX to the formula.
For example: if we are calculating the France member (dense dimension “Markets”):
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100;
- ENDFIX
The above calculation does not generate a block. But we can transform it:
- FIX (“1st semester 19”, Sales, France)
- Petrol = 100;
- ENDFIX
Petrol is a member of the sparse dimension «Products». This calculation does generate the block.
III.b.- Use the SET CREATEBLOCKONEQ command
This command allows us to solve the problem raised in the point:
- II.c.- A calculation assigns a non constant value to a member of a sparse dimension.
We saw that in the calculation:
- FIX (“1st semester 19”, Sales, France)
- Petrol = 100 + Electric;
- ENDFIX
If the reference value (Electric) does not exist, the block is not created:
Including the command: «SET CREATEBLOCKONEQ ON;» the block is created:
- SET CREATEBLOCKONEQ ON;
- FIX (“1st semester 19”, Sales, France)
- Petrol = 100 + Electric;
- ENDFIX
This command presents two options:
- SET CREATEBLOCKONEQ ON;
- SET CREATEBLOCKONEQ OFF; (This second option is the one Essbase applies by default).
This command carries a certain load on the calculations so it negatively affects performance, so it must be applied by limiting it to the area of the database in which we need to create blocks.
In the calculation script this command can be included in different moments, activating or deactivating this property.
- SET CREATEBLOCKONEQ ON;
- …
- …
- SET CREATEBLOCKONEQ OFF;
- …
- …
- SET CREATEBLOCKONEQ ON;
- …
- …
III.c.- Use the SET CREATENONMISSINGBLK command
This command allows us to solve the problem raised in the points:
- II.b.- A calculation assigns a constant value to a member of a dense dimension.
- II.d.- A calculation assigns a non constant value to a member of a dense dimension.
We saw that in the following calculation (II.b.-) the block was not created:
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100;
- ENDFIX
Including this command solves this problem:
- SET CREATENONMISSINGBLK ON;
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100;
- ENDFIX
By default Essbase only calculates those dense members for which blocks already exist, ignoring those members that do not have a block.
- If a calculation is executed that generates data for a member of a dense dimension whose block does not exist, this data is not generated.
With the command «SET CREATENONMISSINGBLK ON», Essbase is forced to generate the new blocks that are necessary to collect the calculated data.
- When this command is activated (by default its value is OFF) Essbase calculates all the possible blocks of the dense dimension that could potentially have results (whether the blocks already exist or not), but only records in the database those blocks that obtain results ; those that do not generate results are not recorded.
- This calculation of all potential blocks entails consumption of resources, which can affect the speed of the calculation: of the alternatives proposed, it is the one that has the most negative impact on performance.
- For this reason, it is essential to limit the section of the Outline to be calculated with a FIX.
This command can be turned on and off successively in a calculation script:
- SET CREATENONMISSINGBLK ON;
- …
- …
- SET CREATENONMISSINGBLK OFF;
- …
- …
- SET CREATENONMISSINGBLK ON;
- …
- …
- SET CREATENONMISSINGBLK OFF;
- …
III.d.- With the @CREATEBLOCK function
This function is used to create blocks: it creates the block but without loading any value (leaving it empty); then we run the calculation to upload the data.
Its structure consists of a single parameter:
- @CREATEBLOCK («Part A»);
«Part A»: defines the block(s) to be created. Can be:
- A member of a sparse dimension: «Petrol»
- A complex member of a sparse dimension: «Petrol» -> «Peter»
- A list of members of a sparse dimension:
- @LIST (“Petrol”, “Electric”, “Hybrid”)
- A function that returns a list of members of a sparse dimension:
- @DESCENDATS («Products»)
This function should be used within a FIX to limit the blocks to be created.
Allow us to solve the problems raised in the points:
- II.b.- A calculation assigns a constant value to a member of a dense dimension.
- II.c.- A calculation assigns a non constant value to a member of a sparse dimension.
- II.d.- A calculation assigns a non constant value to a member of a dense dimension.
Let’s analyze the situation II.c.-
First we create the block we need:
- FIX (“1st semester 19”, Sales, France)
- European (
- @CREATEBLOCK (Petrol);
- )
- ENDFIX
Attention to the structure of the function: to create this block we have used a member of a sparse dimension (Manufacturers) different from the sparse dimension of the member Petrol for which we need to create the block.
Next we run the calculation:
- FIX (“1st semester 19”, Sales, France)
- Petrol = 100 + Electric;
- ENDFIX
Now the block is created.
It is important to note that it must be done in two steps: 1st FIX / 2nd FIX; it cannot be done in a single FIX: the following calculation would not work:
- FIX (“1st semester 19”, Sales, France)
- European (
- @CREATEBLOCK (Petrol);
- )
- Petrol = 100 + Electric;
- ENDFIX
In situations II.b.- and II.d.- the process would be exactly the same:
Situation II.b.-:
- FIX (“1st semester 19”, Sales, France)
- European (
- @CREATEBLOCK (Petrol);
- )
- ENDFIX
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100;
- ENDFIX
Situation II.d.-:
- FIX (“1st semester 19”, Sales, France)
- European (
- @CREATEBLOCK (Petrol);
- )
- ENDFIX
- FIX (“1st semester 19”, Sales, Petrol)
- France = 100 + Spain;
- ENDFIX
Any question, please send an email to: essbaseeasy@gmail.com
Español
Un problema que se puede presentar en Essbase es la creación de bloques: se lanza un cálculo, con una sintaxis correcta, pero el dato que se espera del cálculo no queda recogido.
I.- ¿EN QUÉ CIRCUNSTANCIAS LA CREACIÓN DE BLOQUES NO GENERA PROBLEMAS?
- Con la carga directa de datos.
- Con los cálculos de agregación: AGG / CALC DIM / CALC ALL.
- Cuando se utiliza el comando DATACOPY: copia los datos de un área origen de la base a un área destino, generando los bloques correspondientes.
II.- ¿EN QUÉ CIRCUNSTANCIAS LA CREACIÓN DE BLOQUES SÍ PUEDE PLANTEAR PROBLEMAS?
Cuando la generación de un nuevo bloque es resultado de un cálculo. En estos casos puede surgir el problema: un cálculo correcto no genera el dato esperado.
Hay que distinguir si se está calculando un miembro de una dimensión dispersa o de una dimensión densa. Vamos a analizar cuatro situaciones.
Partimos de un Outline con la siguiente estructura:

Y con los siguientes miembros:

Analicemos las siguientes situaciones:
II.a.- Un cálculo asigna un valor constante a un miembro de una dimensión dispersa:
- Cuando el cálculo asigna un valor constante a un miembro de una dimensión dispersa se crea el bloque.
Veamos un ejemplo:
- FIX(“1er semester 19”,Sales,France)
- Petrol = 100;
- ENDFIX
Este cálculo genera el bloque:

II.b.- Un cálculo asigna un valor constante a un miembro de una dimensión densa:
- Cuando el cálculo asigna un valor constante a un miembro de una dimensión densa:
- Si el bloque no existe no se crea.
- Si ya existe el dato queda recogido.
- Essbase sólo calcula miembros densos de los bloques existentes, por lo que si no existe el bloque no se calcula el miembro.
Veamos un ejemplo:
Si el bloque no existe:
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100;
- ENDFIX
Este cálculo no genera el bloque:

Si el bloque ya existe:

Este cálculo sí recoge el dato:

II.c.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión dispersa:
- FIX(“1er semester 19”,Sales,France)
- Petrol = 100 + Electric;
- ENDFIX
Si el dato de la referencia existe:

Sí se crea el bloque:

Si el dato de la referencia no existe:

No se crea el bloque:

II.d.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión densa:
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100 + Spain;
- ENDFIX
La situación es similar a la que vimos cuando asignamos una constante a un miembro de una dimensión densa: si el bloque ya existe:

El dato queda recogido:

Y si no existe:

El bloque no se crea:

III.- ¿CÓMO SE PUEDE SOLUCIONAR EL PROBLEMA DE CREACIÓN DE BLOQUES?
III.a.- Ver si la fórmula de cálculo de un miembro denso se puede convertir en una fórmula de cálculo de un miembro disperso.
Este procedimiento nos permite solucionar el problema planteado en los puntos:
- II.b.- Un cálculo asigna un valor constante a un miembro de una dimensión densa.
- II.d.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión densa (siempre que el dato de referencia exista).
Es el procedimiento más recomendable en esta situación: hay que analizar la estructura del FIX y de la fórmula y ver si se puede llevar la dimensión densa de la fórmula al FIX y una dimensión dispersa del FIX a la fórmula.
Por ejemplo: si estamos calculando el miembro France (dimensión densa “Markets”):
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100;
- ENDFIX
El cálculo anterior no genera bloque. Pero si lo transformamos:
- FIX(“1er semester 19”,Sales, France)
- Petrol = 100;
- ENDFIX
Petrol es un miembro de la dimensión dispersa “Products”. Este cálculo si genera bloque.
III.b.- Utilizar el comando SET CREATEBLOCKONEQ
Este comando nos permite solucionar el problema planteado en el punto:
- II.c.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión dispersa.
Vimos que en el cálculo:
- FIX(“1er semester 19”,Sales,France)
- Petrol = 100 + Electric;
- ENDFIX
Si el valor de referencia (Electric) no existe, no se crea el bloque:
Incluyendo el comando: “SET CREATEBLOCKONEQ ON;” sí se crea el bloque:
- SET CREATEBLOCKONEQ ON;
- FIX(“1er semester 19”,Sales,France)
- Petrol = 100 + Electric;
- ENDFIX
Este comando presenta dos opciones:
- SET CREATEBLOCKONEQ ON;
- SET CREATEBLOCKONEQ OFF; (Esta segunda opción es la que aplica Essbase por defecto).
Este comando conlleva cierta carga en los cálculos por lo que afecta negativamente en el performance, por lo que hay que aplicarlo limitándolo al área de la base en la que necesitamos crear bloques.
En un mismo script de cálculo se puede incluir este comando en diversas fases, activando o desactivando esta propiedad.
- SET CREATEBLOCKONEQ ON;
- …..
- …..
- SET CREATEBLOCKONEQ OFF;
- …..
- …..
- SET CREATEBLOCKONEQ ON;
- …..
- …..
III.c.- Utilizar el comando SET CREATENONMISSINGBLK
Este comando nos permite solucionar el problema planteado en los puntos:
- II.b.- Un cálculo asigna un valor constante a un miembro de una dimensión densa.
- II.d.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión densa.
Vimos que en el siguiente cálculo (II.b.-) no se creaba el bloque:
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100;
- ENDFIX
Incluyendo previamente este comando se soluciona este problema:
- SET CREATENONMISSINGBLK ON;
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100;
- ENDFIX
Por defecto Essbase tan sólo calcula aquellos miembros densos para los que ya existen bloques ignorando aquellos miembros que no tienen bloque.
- Si se ejecuta un cálculo que genera un dato para un miembro de una dimensión densa cuyo bloque no existe este dato no se genera.
Con el comando “SET CREATENONMISSINGBLK ON” se fuerza a Essbase a generar los nuevos bloques que sean necesarios para recoger los datos calculados.
- Cuando se activa este comando (por defecto su valor es OFF) Essbase calcula todos los posibles bloques de la dimensión densa que potencialmente podrían tener resultados (existan ya los bloques o no), pero tan sólo graba en la base aquellos bloques que obtengan resultados; aquellos que no generen resultados no se graban.
- Este cálculo de todos los bloques potenciales conlleva consumo de recursos lo que puede afectar a la velocidad del cálculo: de las alternativas planteadas es la que tiene un impacto más negativo en el performance.
- Por ello es fundamental limitar con un FIX la sección del Outline que se quiere calcular.
Este comando se puede activar y desactivar sucesivamente en un script de cálculo:
- SET CREATENONMISSINGBLK ON;
- …
- …
- SET CREATENONMISSINGBLK OFF;
- …
- …
- SET CREATENONMISSINGBLK ON;
- …
- …
- SET CREATENONMISSINGBLK OFF;
- …
III.d.- Con la función @CREATEBLOCK
Esta función se utiliza para crear bloques: se limita a crear el bloque pero sin cargar ningún valor (dejándolo vacío); a continuación lanzamos el cálculo para subir el dato.
Su estructura consta de un único parámetro:
- @CREATEBLOCK (“Parte A”);
“Parte A”: define el bloque(s) que se va(n) a crear. Puede ser:
- Un miembro de una dimensión dispersa: “Petrol”
- Un miembro complejo de una dimensión dispersa: “Petrol” -> “Peter”
- Una lista de miembros de una dimensión dispersa:
- @LIST(“Petrol”,“Electric”, “Hybrid”)
- Una función que devuelve una lista de miembros de una dimensión dispersa:
- @DESCENDATS(“Products”)
Esta función debe usarse dentro de un FIX para limitar los bloques que se van a crear.
Nos permita solucionar los problemas planteados en los puntos:
- II.b.- Un cálculo asigna un valor constante a un miembro de una dimensión densa.
- II.c.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión dispersa.
- II.d.- Un cálculo asigna un valor distinto de una constante a un miembro de una dimensión densa.
Analicemos la situación II.c.-
Primero creamos el bloque que necesitamos:
- FIX(“1er semester 19”,Sales,France)
- European(
- @CREATEBLOCK (Petrol);
- )
- ENDFIX
Atención a la estructura de la función: para crear este bloque hemos utilizado un miembro de la dimensión dispersa (Manufacturers), diferente de la dimensión dispersa a la que pertenece el miembro Petrol para el que necesitamos crear el bloque.
A continuación lanzamos el cálculo:
- FIX(“1er semester 19”,Sales,France)
- Petrol = 100 + Electric;
- ENDFIX
Ahora sí se crea el bloque.
Es importante reseñar que hay que hacerlo en dos pasos: 1er FIX / 2º FIX; no se puede hacer en un único FIX: el siguiente cálculo no funcionaría:
- FIX(“1er semester 19”,Sales,France)
- European(
- @CREATEBLOCK (Petrol);
- )
- Petrol = 100 + Electric;
- ENDFIX
En las situaciones II.b.- y II.d.- el proceso sería exactamente igual:
Situación II.b.-:
- FIX(“1er semester 19”,Sales,France)
- European(
- @CREATEBLOCK (Petrol);
- )
- ENDFIX
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100;
- ENDFIX
Situación II.d.-:
- FIX(“1er semester 19”,Sales,France)
- European(
- @CREATEBLOCK (Petrol);
- )
- ENDFIX
- FIX(“1er semester 19”,Sales,Petrol)
- France = 100 + Spain;
- ENDFIX
Cualquier consulta envía, por favor, un correo a: essbaseeasy@gmail.com