Calculating with Formula Variables

The following example shows how you can calculate with formula variables using processing type Replacement Path with replacement from a characteristic value with the properties/values of the characteristic. The formula is replaced here in accordance with the cell context.

Using Formula Variables in Calculated Key Figures and Formulas

The replacement of formula variables with the processing type Replacement Path from a characteristic value acts differently in calculated key figures and formulas:

  • If you use a formula variable with "Replacement from the Value of an Attribute" in a calculated key figure, the system automatically adds the drilldown according to the reference characteristic for the attribute. The system then evaluates the variables for each characteristic value for the reference characteristic. The calculated key figure is then calculated and, subsequently, all of the other operations are executed (all additional, calculated key figures, aggregations, and formulas). Before aggregation with the reference characteristic, the system therefore only calculates the operators which are assembled in the calculated key figure itself.
  • If you are using a formula variable with Replacement from the Value of an Attribute in a formula element, the variable is only calculated if the reference characteristic is uniquely specified in the corresponding row, column, or in the filter.

Replacement from the Value of an Attribute

When using formula variables, you can create a reference to the reference characteristic of the variable by taking the value of the variables from attribute [1ATTRREF] Characteristic Reference (Constant 1). This object is a dummy attribute that is available with each characteristic. It is used to create a reference to the characteristic, which is not used for aggregation. By choosing this attribute, you can influence the aggregation behavior of calculated key figures in a targeted way and can improve performance during calculation.