SAP Community Log-in Update

In a few months, SAP Community will switch to SAP Universal ID as the only option to login. Donât wait, create your SAP Universal ID now! If you have multiple accounts, use the Consolidation Tool to merge your content.

Jul 02, 2021 at 10:02 AM
# How to realize a SUM(IF( key figure calculation in IBP?

Dear SAP Community,

Related to a customer request we are trying to realize a SUM(IF( function in the key figure calculation. This is the function which should be realized:

KF1@PERPRODLOC = SUM(IF(Attribute1=”X”;InventoryKF1@PERPRODLOC;0); IF(Attribute2=”X”;InventoryKF2@PERPRODLOC;0); IF(Attribute3=”X”;InventoryKF3@PERPRODLOC;0); IF(Attribute4=”X”;InventoryKF4@PERPRODLOC;0); IF(Attribute5=”X”;InventoryKF5@PERPRODLOC;0); IF(Attribute6=”X”;InventoryKF6@PERPRODLOC;0))

The idea is to consider in the calculation the key figures InventoryKF1 to InventoryKF6 only if there is a “X” flagged in the corresponding attribute in MDT LOCATIONPRODUCT (see example calculation in Excel):

The function can be maintained in the key figure calculation but during planning are check/activation the following error messages are thrown and activation is cancelled:

“Calculation “KF1@PERPRODLOC” is an aggregation. It must have exactly 1 input KF.”

“Calculation “KF1@PERPRODLOC” must not contain aggregation of different key figures”

So the system does not allow to use the function “SUM” in that way.

Is there a special function available which can be used in the calculation editor? Or how can this requirement be realized?

Thank you very much in advance for your support.

Best regards

Sebastian