@MODE

English (Español a continuación)

This function calculates the “mode” value of a series (the most repeated value).

Its structure consists of 2 parts:

  • @MODE (A, B):

Part «A»: determines the treatment given to members that are zero or missing (no data). There are 4 options:

  • SKIPNONE: it takes into account all the values ​​of the series for the calculation of the mode.
  • SKIPMISSING: for the calculation of the mode exclude those members that do not have data.
  • SPIPZERO: for the calculation of the mode exclude those members that have zero value.
  • SKIPBOTH: for the calculation of the mode exclude those members that have zero value or that do not have data.

Part “B”: sets the data series for which the mode is calculated. It can be defined in different ways:

  • A list of members: for example @LIST (Spain, Germany, Italy …)
  • A list of multidimensional members: for example @LIST (Spain-> Jan, Spain-> Feb, Spain-> Mar…)
  • A function of type @XRANGE.

Considerations:

  • If two values ​​are repeated with the same frequency, this function returns the smaller of them.
  • If no value in the series is repeated, this function returns the smallest value in the series.
  • It is convenient to use this function within a FIX structure, limiting the segment of the base in which the function is calculated, which allows to gain in efficiency.

Let’s see an example: considering the following series of sales data:

We apply the following function:

  • FIX(Sales)
    • “Sales_mode” = @MODE (SKIPNONE, @ XRANGE (2016 -> Jan, 2018 -> Dec));
  • ENDFIX

We obtain as a result: “Sales_mode” = 133 (this value is repeated 6 times).

Any question, please send an email to: essbaseeasy@gmail.com

Español

Esta función calcula el valor “moda” de una serie (el valor que más se repite).

Su estructura consta de 2 partes:

  • @MODE(A,B):

Parte “A”: determina el tratamiento que se da a los miembros que son cero o missing (sin dato). Caben 4 opciones:

  • SKIPNONE: Tiene en cuenta todos los valores de la serie definida para el cálculo de la moda.
  • SKIPMISSING: Para el cálculo de la moda excluye aquellos miembros que no tengan dato.
  • SPIPZERO: Para el cálculo de la moda excluye aquellos miembros que tengan valor cero.
  • SKIPBOTH: Para el cálculo de la moda excluye aquellos miembros que tengan valor cero o que no tengan dato.

Parte “B”: fija la serie de datos para la que se calcula la moda. Puede venir definida de diferentes modos:

  • Una lista de miembros: por ejemplo @LIST(España,Alemania,Italia…)
  • Una lista de miembros multidimensionales: por ejemplo @LIST(España->Ene, España->Feb, España->Mar…)
  • Una función del tipo @XRANGE.

Consideraciones:

  • Si dos valores se repiten con la misma frecuencia, esta función da como resultado el menor de ellos.
  • Si ningún valor de la serie se repite, esta función da como resultado el menor valor de la serie.
  • Es conveniente utilizar esta función dentro de una estructura FIX, acotando el segmento de la base en la que se calcula la función lo que permite ganar en eficiencia.

Veamos un ejemplo: partiendo de la siguiente serie de datos de ventas:

Aplicamos la siguiente función:

  • FIX(Sales)
    • “Sales_mode” = @MODE (SKIPNONE, @ XRANGE (2016 -> Jan, 2018 -> Dec));
  • ENDFIX

Obtenemos como resultado: “Sales_mode” = 133 (este valor se repite 6 veces)

Cualquier consulta envía, por favor, un correo a: essbaseeasy@gmail.com

Anuncio publicitario