FORMULAS IN THE OUTLINE

English (Español a continuación)

Formulas can be assigned directly to members in the outline.

These formulas are similar to those used in a calculation script and can include:

  • Mathematical operators
  • Functions
  • Member / dimension names
  • Substitution variables
  • Numerical constants

The formula syntax is similar to that of a calculation script, but there are some differences:

  • IF… ENDIF construction used in a calculation script must go between parentheses and be associated to a member of the outline, while in the outline it goes without parentheses.
  • FIX … ENDFIX structure cannot be used in formulas in outline members.

Process

a) The formulas can be assigned individually:

  • Right button on the member; in the window opened select “Edit member properties”.
  • In the window opened select “Formula”; a window opens and the formula is included in the «Script».
  • Then click on «Verify» and then on «Accept».
  • Finally, the outline changes must be saved.

b) Formulas can also be uploaded through dimension build rules:

  • When the rule is defined, in the menu «Field properties» / option «Dimension creation properties / option «Field», selects type “Formula».
  • If the formula consists of several elements with spaces between them (for example: Sales 2016 – Sales 2015;) they must be enclosed in quotation marks. But when uploading the formula Essbase removes these quotes; if some of them must be kept, put the sign «\» in front of each one of them.
  • For example: if we want to upload the previous formula, we have to write it in the load file:

“\”Sales 2016\” – \”Sales 2015\”;”

  • We mark in yellow those quotes that Essbase keeps (because they are preceded by the symbol \) and in red those quotes that disappear:
  • This formula is uploaded to the outline:

”Sales 2016” – ”Sales 2015”;

When formulas are uploaded it is important to verify them:

  • Essbase warns of syntactic errors (errors in the structure of the formula) but not of semantic errors (the formula is well constructed but does not give the expected result).
  • That is why it is important to do tests and check the results.

When is the calculation run?

Essbase calculates the formulas associated to members in the outline:

  • When runs a default calculation of the base (CALC ALL).
  • When runs a calculation script that calculates the member that contains the formula (for example, a CALC DIM of the dimension that contains the member with the formula).
    • In contrast, the “AGG” function of the dimension that contains the member does not execute the formula.
  • It is also executed by including in the calculation script the name of the member of the outline that has the formula followed by «;»
    • For example, if the member “Budget 2021” has an associated formula in the outline, it can be executed from a calculation script including the instruction: “Budget 2021”;
  • If the formula is associated to a member with dynamic calculation, it is calculated when the user consults that member.

Other considerations

  • Formulas cannot be associated to shared members or members with the property “label only”.
  • If a calculation script applies a formula to a member of the outline different from the one it has associated in the outline, the formula in the calculation script prevails.

Español

Se pueden asignar fórmulas directamente a miembros del outline.

Las fórmulas que se pueden asignar son similares a las que se utilizan en un script de cálculo y pueden incluir:

  • Operadores matemáticos
  • Funciones
  • Nombres de miembros / dimensiones
  • Variables de sustitución
  • Constantes numéricas

La sintaxis de las fórmulas es similar a la de un script de cálculo, pero hay ciertas diferencias:

  • Si se utiliza una construcción IF … ENDIF en un script de cálculo tiene que ir entre paréntesis asociado a un miembro del outline, mientras que cuando va en el outline va sin paréntesis.
  • La estructura FIX … ENDFIX no se puede utilizar en fórmulas en miembros del outline

Procedimiento

a) Se pueden asignar las fórmulas de manera individual:

  • Botón derecho sobre el miembro; en la ventana que se abre seleccionar “Editar propiedades de miembros”.
  • En la ventana que se abre seleccionar “Fórmula”; se abre una ventana y en el “Script” se incluye la fórmula.
  • Luego se hace click en “Verificar” y a continuación en “Aceptar”.
  • Por último, se guardan los cambios del outline.

b) También se pueden subir las fórmulas con reglas de creación de dimensión:

  • Cuando se define la regla, dentro del menú “Propiedades de campo”, en la opción “Propiedades de creación de dimensión”, en la opción “Campo” se selecciona tipo “Fórmula”.
  • Si la fórmula consta de diversos elementos con espacios entre ellos (por ejemplo: Ventas 2016 – Ventas 2015;) hay que incluirlos entre comillas. Pero al subir la fórmula al outline Essbase elimina estas comillas; si algunas de ellas deben mantenerse hay que poner el signo “\” delante de cada una de ellas.
  • El ejemplo anterior lo tendríamos que escribir en el archivo de carga:

“\”Ventas 2016\” – \”Ventas 2015\”;”

  • Marcamos en amarillo aquellas comillas que Essbase mantiene (porque van precedidas del símbolo \) y en rojo aquellas comillas que desaparecen:
  • Esta fórmula queda subida al outline:

”Ventas 2016” – ”Ventas 2015”;

Cuando se suben fórmulas al outline es importante verificar su funcionamiento:

  • Essbase avisa de errores sintácticos (errores en la estructura de la fórmula) pero no de errores semánticos (la fórmula está bien construida pero no da el resultado esperado).
  • Por ello es importante hacer pruebas y chequear los resultados.

¿Cuando se ejecuta el cálculo?

Essbase calcula las fórmulas asociadas a miembros del outline:

  • Cuando ejecuta un cálculo por defecto de la base (CALC ALL).
  • Cuando ejecuta un script de cálculo que calcula el miembro que contiene la fórmula (por ejemplo, un CALC DIM de la dimensión que contiene el miembro con la fórmula).
    • En cambio, la función “AGG” de la dimensión que contiene el miembro con la fórmula no ejecuta la fórmula.
  • También se ejecuta incluyendo en el script de cálculo el nombre del miembro del outline que tiene asociada la fórmula seguido de “;”
    • Por ejemplo, si el miembro “Pptos 2021” tiene una fórmula asociada en el outline, se puede ejecutar desde un script de cálculo incluyendo la instrucción: “Pptos 2021”;
  • Si la fórmula está asociada a un miembro con cálculo dinámico se calcula cuando el usuario consulta ese miembro.

Otras consideraciones

  • No se pueden asociar fórmulas a miembros compartidos ni a miembros con la propiedad “solo etiqueta”.
  • Si en un script de cálculo se aplica a un miembro del outline una fórmula diferente a la que tiene asociada en el outline, prevalece la del script de cálculo.
Anuncio publicitario