cancel
Showing results for 
Search instead for 
Did you mean: 

KF calculations - Price changes

d_lucas
Explorer
0 Kudos

Hi experts,

we're trying to create a KF calculation that will calculate the projected price based on an initial price and monthly raises in % as shown in the picture.

Projected price (month n) = projected price (month n-1) * (1 + Price change(n))

Does anybody know how to do this in kf calculations? we tried using IBP_LPA and IBP_PERIODSHIFT but anything seems to work.

Any advice is greatly appreciated. Thanks!

0 Kudos

Hi Lucas, you mentioned you guys did use a Local Member to achieve the goal, but wouldn't a CPI do the job as easy as well?

Accepted Solutions (0)

Answers (2)

Answers (2)

Praveen_Jadhav
Participant
0 Kudos

Hi Lucas,

Assuming the price change is constant throughout the periods, you can use below key figures as a calculation of the projected price:

KF1: Copy the price to each bucket in future buckets.

KF2: The "Price change %" key figure in your example. (preferred this as an Attribute as KF)

KF3: Count key figure, Current bucket = 0; next month = 1; next to next month = 2 and so on.

KF4 (Projected Price) = KF1 *(1+ KF2 %)^KF3. Note: for power operator use ** instead of ^.

Please find attached the KF calculation details for reference.

Hope it helps.

Regards,

Praveen Jadhav

d_lucas
Explorer
0 Kudos

Hi Praveen,

thanks for your answer. This issue appeared when working for a company in Argentina where prices usually change a lot, so unfortunately the price change is not the same throughout the periods and therefore we cannot use your solution. We ended up calculating the projected price with a local member (the calculation is super simple in Excel) and then copying those values to the key figure using a macro with VBA code.

Hopefully SAP will come with a better solution in the future.

Regards,

ayanbishnu1981
Active Contributor
0 Kudos

Hello szuffiaurre

Whether you use IBP_LPA and IBP_PERIODSHIFT or CAGGR along with, you cannot acheive the desired caluclation using standard KF expressions available. The reason behind is your calculation formula is having n dynamically calculated in 2 different inputs in the calculation. This cannot be done using KF expression as it will form a loop cycle in the calculation.I think this calculation will be a good candidate for Lcode. My suggestion would be to raise an OSS for Locde to SAP and see what they can come up with.