SET AGGMISSG

English (Español a continuación)

This statement specifies whether members without data (missing) are to be taken into account in aggregation calculations. This instruction affects the aggregation of sparse dimensions and admits 2 values: ON / OFF:

  • SET AGGMISSG ON: members with data and without data are taken into account in the aggregation: the higher-level members (whether they have been charged with data or not) are calculated as the sum of its dependent members level 0.
  • SET AGGMISSG OFF: members without data are not taken into account in the aggregation, only those with data. If a data is loaded to a higher level member and its lower levels have no data, in the aggregation the calculation ignores its lower levels and keeps the data loaded at the upper level.

This last option SET AGGMISSG OFF is very interesting if there is some information that is not available at lower levels but only at higher levels since it maintains this data, but it must be used with great caution:

  • If data from levels 0 is recorded and added, and later this data is deleted, the higher level maintains the data from the previous aggregation.
  • This danger is avoided if in each load the entire database is previously erased, but there are times when database are not operated in this way: new values ​​are recorded without erasing the existing ones: the problem mentioned here can happen.

Let’s see an example:

We start from the following position and we want to calculate the upper level:

The result is the same applying both SET AGGMISSG ON and SET AGGMISSG OFF:

But if the starting situation is the following (we only have the data from the top level):

The result would be different when adding with SET AGGMISSG ON:

What with SET AGGMISSG OFF:

The risk that we mentioned earlier is if after the first aggregation:

We delete the 0 levels; if we add again with SET AGGMISSG ON the result would be:

While with SET AGGMISSG OFF we would obtain the following result:

Español

Esta instrucción especifica si en los cálculos de agregación se van a tener en cuenta los miembros sin datos (missing). Esta instrucción afecta a la agregación de dimensiones dispersas y admite 2 valores ON / OFF:

SET AGGMISSG ON: en la agregación se tienen en cuenta los miembros con datos y sin datos, de tal manera que cada miembro de nivel superior lo calcula como suma de sus miembros de nivel 0, tengan valores o no.

SET AGGMISSG OFF: en la agregación no se tienen en cuenta los miembros sin datos sino únicamente aquellos que tengan datos. Si se carga un dato a un miembro de nivel superior y sus niveles inferiores no tienen dato, en la agregación el cálculo ignora sus niveles inferiores y mantiene el dato cargado en el nivel superior.

Esta última opción SET AGGMISSG OFF es muy interesante si hay alguna información que no se dispone de niveles inferiores pero sí de niveles superiores ya que mantiene este dato, pero hay que utilizarla con mucha cautela:

Si se graban datos de niveles 0 y se agrega, si posteriormente se borran los datos de los niveles inferiores el nivel superior mantiene el dato de la agregación anterior.

Este peligro se evita si en cada carga se borra previamente toda la base pero hay veces que no se opera de esta manera sino que se graban valores nuevos sin borrar los ya existentes, surgiendo aquí el problema mencionado.

Veamos un ejemplo:

Partimos de la siguiente posición y queremos calcular el nivel superior:

El resultado es el mismo aplicando tanto SET AGGMISSG ON como SET AGGMISSG OFF:

Pero si la situación de partida es la siguiente (tan sólo tenemos el dato del nivel superior):

El resultado sería distinto al agregar con SET AGGMISSG ON:

Que con SET AGGMISSG OFF:

También el riesgo que comentábamos anteriormente es si tras la primera agregación:

Borramos los niveles 0, si volvemos a agregar con SET AGGMISSG ON el resultado sería:

Mientras que con SET AGGMISSG OFF obtendríamos el siguiente resultado:

Anuncio publicitario