@ACCUM

English (Español a continuación)

This function accumulates the value of a variable through a range. Accumulates the value of this variable from the origin of the range to the calculated member.

Its structure consists of two parts:

@ACCUM (Part A, Part B);

  • “Part A”: is a member of the variable dimension (for example: sales, expenses, units…).
  • «Part B»: This part is optional. Collect a range through which the variable accumulates. It can be defined by a list of members: for example @LIST (Valencia, Barcelona, ​​Madrid, Malaga); or by a function that returns a relationship of members: for example @RELATIVE (“Markets”, 0). If this part is left empty, the function takes as a list of the members levels 0 of the dimension defined as «Time».

Let’s see an example: starting from the following table:

Applying the following calculation:

  • Accumulated Units = @ACCUM (“Units”, @RELATIVE (“Months”, 0));

We obtain as a result:

A mathematical operator cannot be applied to this function. For example, you can NOT formulate:

  • @ACCUM (“Sales”, @RELATIVE (“Markets”, 0) * 5;
  • @ACCUM (“Sales”, @RELATIVE (“Markets”, 0) / 4;

Español

Esta función acumula el valor de una variable a través de un rango. Acumula el valor de esta variable desde el origen del rango hasta el miembro calculado.

Su estructura consta de dos partes:

@ACCUM (Parte A, Parte B);

  • “Parte A”: es un miembro de la dimensión variable (por ejemplo: ventas, gastos, unidades…).
  • “Parte B”: Esta parte es opcional. Recoge un rango a través del cual se va acumulando la variable. Puede venir definido por una lista de miembros: por ejemplo @LIST(Valencia,Barcelona,Madrid,Málaga); o por una función que devuelva una relación de miembros: por ejemplo @RELATIVE(“Mercados”,0).

Si esta parte se deja vacía la función toma como lista de miembros los niveles 0 de la dimensión definida como “Tiempo”.

Veamos un ejemplo: partiendo de la siguiente tabla:

Aplicando el siguiente cálculo:

  • Unidades Acumuladas = @ACCUM (“Unidades”, @RELATIVE(“Meses”,0));

Obtenemos como resultado:

A esta función no se le puede aplicar un operador matemático. Por ejemplo, NO se puede formular:

  • @ACCUM (“Ventas”, @RELATIVE(“Mercados”,0)*5;
  • @ACCUM (“Ventas”, @RELATIVE(“Mercados”,0)/4;
Anuncio publicitario