EXCLUDE

English (Español a continuación)

This command has the following structure:

  • EXCLUDE ()
    • Calculation script
  • ENDEXCLUDE

The EXCLUDE command collects the member (s) that you want to exclude from the calculation included within this structure.

For example:

  • EXCLUDE (Germany, Italy)
    • Sales_budget = Sales * 1.2;
  • ENDEXCLUDE

This instruction calculates the sales budget for the different markets, except for Germany and Italy.

Its operation is the reverse of the FIX command:

  • While FIX… ENDFIX selects those members to which the calculation included in it is applied, EXCLUDE… ENDEXCLUDE selects those members to which the calculation is not applied.
  • Sometimes it may be easier to identify which member (s) you want to exclude from the calculation than to select which member (s) you want to include in it.

For example: suppose that the dimension “Products” has 5 members: milk, oil, biscuits, rice and flour, we can execute the following calculation:

  • FIX (@LIST (milk, oil, cookies, rice))
    • AGG (Sales);
  • ENDFIX

This calculation is equivalent to:

  • EXCLUDE (flour)
    • FIX (@RELATIVE (Products, 0))
      • AGG (Sales);
    • ENDFIX
  • ENDEXCLUDE

This command can be used:

a) Alone:

  • EXCLUDE (Germany, Italy)
    • Sales_budget = Sales * 1.2;
  • ENDEXCLUDE

b) Within a FIX structure:

  • FIX (@IDESCENDANTS (Europe))
    • EXCLUDE (Germany, Italy)
      • Sales_budget = Sales * 1.2;
    • ENDEXCLUDE
  • ENDFIX

c) Including a FIX structure:

  • EXCLUDE (Germany, Italy)
    • FIX (@IDESCENDANTS (Europe))
      • Sales_budget = Sales * 1.2;
    • ENDFIX
  • ENDEXCLUDE

When you use this command in conjunction with the FIX command, members in the EXCLUDE command are excluded from the calculation even if they are included in the FIX command.

  • In the two previous examples Germany and Italy are excluded from the calculation even though they are included in FIX (@IDESCENDANTS (Europe)).

Member (s) of one or more dimensions can be included in the EXCLUDE command.

  • EXCLUDE (@LIST (Germany, Italy),”Year 2020”)
    • Sales_budget = sales * 1.2;
  • ENDEXCLUDE

You can also use the «AND» and «OR» operators:

a) The «AND» operator includes conditions that must be met together.

They must be conditions of the same dimension; for example:

  • EXCLUDE (@IDESCENDANTS (Europe) AND @LEVMBRS (Markets, 0))

If they are conditions of different dimensions, it would result in an empty set and Essbase would ignore the EXCLUDE command.

b) The “OR” operator includes alternative conditions: it is enough that one of them is fulfilled.

They can be of the same or different dimensions.

  • EXCLUDE (@IDESCENDANTS (Europe) OR “Year 2019”)

Some considerations of the EXCLUDE command:

  • Can be used in calculation scripts but not in formulas on outline members.
  • You cannot include the CALC ALL, CLEARDATA, or DATACOPY commands.
  • Does not affect dynamic calculation members (if they are included this command ignores them).

Español

Este comando tiene la siguiente estructura:

  • EXCLUDE()
    • Script de cálculo
  • ENDEXCLUDE

El comando EXCLUDE recoge aquel miembro(s) que se quiere excluir del cálculo incluido dentro de esta estructura.

Por ejemplo:

  • EXCLUDE(Alemania, Italia)
    • Obj_ventas = ventas * 1.2;
  • ENDEXCLUDE

Esta instrucción calcula el objetivo de ventas para los diferentes mercados, excepto para Alemania e Italia.

Su funcionamiento es el inverso al del comando FIX:

  • Mientras FIX … ENDFIX  selecciona aquellos miembros a los que se le aplica el cálculo incluido en la misma, EXCLUDE … ENDEXCLUDE selecciona aquellos miembros a los que no se le aplica el cálculo.
  • A veces puede ser más fácil identificar aquel miembro(s) que se quiere excluir del cálculo que seleccionar aquel miembro(s) a los que aplicar el cálculo.

Por ejemplo: supongamos que la dimensión “Productos” tiene 5 miembros: leche, aceite, galletas, arroz y harina, podemos ejecutar el siguiente cálculo:

  • FIX(@LIST(leche, aceite, galletas, arroz))
    • AGG(Ventas);
  • ENDFIX

Este cálculo es equivalente:

  • EXCLUDE(harina)
    • FIX(@RELATIVE(Productos,0))
      • AGG(Ventas);
    • ENDFIX
  • ENDEXCLUDE

Este comando se puede utilizar:

a) Aisladamente:

  • EXCLUDE(Alemania, Italia)
    • Obj_ventas = ventas * 1.2;
  • ENDEXCLUDE

b) Dentro de una estructura FIX:

  • FIX(@IDESCENDANTS(Europa))
    • EXCLUDE(Alemania, Italia)
      • Obj_ventas = ventas * 1.2;
    • ENDEXCLUDE
  • ENDFIX

c) Incluyendo una estructura FIX:

  • EXCLUDE(Alemania, Italia)
    • FIX(@IDESCENDANTS(Europa))
      • Obj_ventas = ventas * 1.2;
    • ENDFIX
  • ENDEXCLUDE

Al utilizar conjuntamente este comando con el comando FIX, los miembros del comando EXCLUDE quedan excluidos del cálculo aunque estén incluidos en el comando FIX.

  • En los dos ejemplos anteriores Alemania e Italia quedan excluidas del cálculo aunque estén incluidos en FIX(@IDESCENDANTS(Europa)).

En el comando EXCLUDE se pueden incluir miembros(s) de una o varias dimensiones.

  • EXCLUDE(@LIST(Alemania, Italia),”Año 2020”)
    • Obj_ventas = ventas * 1.2;
  • ENDEXCLUDE

También se pueden utilizar los operadores “AND” y “OR”:

a) El operador “AND” incluye condiciones que se deben cumplir conjuntamente.

Deben ser condiciones de la misma dimensión; por ejemplo:

  • EXCLUDE(@IDESCENDANTS(Europa) AND @LEVMBRS(Mercados,0))

Ya que si son condiciones de dimensiones diferentes daría lugar a un conjunto vacío y Essbase ignoraría el comando EXCLUDE.

b) El operador “OR” incluye condiciones alternativas: basta con que se cumpla una de ellas.

Pueden ser de la misma o de diferentes dimensiones.

  • EXCLUDE(@IDESCENDANTS(Europa) OR “Año 2019”)

Algunas consideraciones del comando EXCLUDE:

  • Se puede utilizar en scripts de cálculo pero no en fórmulas en miembros del outline.
  • No puede incluir los comandos CALC ALL, CLEARDATA o DATACOPY.
  • No afecta a miembros de cálculo dinámico (si se incluyen este comando los ignora).
Anuncio publicitario