Instead of using several complex calculations, use the IBP_WEIGHTEDAVG function to calculate weighted average for a key figure in one step.
To calculate weighted average, use the IBP_WEIGHTEDAVG function in the calculation definition of key figures in the Planning Areas app: IBP_WEIGHTEDAVG(<KEY FIGURE@PLANLEVEL>,<KEY FIGURE@PLANLEVEL> or <ATTRIBUTE>,<TYPE OF NUMERATOR>)
Parameters of the Weighted Average Function
The IBP_WEIGHTEDAVG function has three mandatory parameters:
- Input key figure at planning level
- As an example, STOREDPRICE@MTHPRODLOC. The sum of the first parameter multiplied by the second parameter is the numerator of the calculation, for example, SUM("STOREDPRICE@MTHPRODLOC"*"ACTUALSQTY@MTHPRODLOC").
- Input key figure at planning level or an attribute
- The second parameter of the IBP_WEIGHTEDAVG function is the denominator of the calculation. In case a calculated numerator is used in the function, the value of the second parameter is the denominator and the weight as well. If it is a master data attribute, it must be assigned to the input planning level of the first key figure.
- Type of the numerator
- This parameter defines whether the numerator is stored or calculated. If the value is "CALCULATEDNUMERATOR", the numerator is calculated; it is the sum of the first parameter multiplied by the second parameter. If the value is "STOREDNUMERATOR", the numerator's value already includes a multiplication by the weight.