cancel
Showing results for 
Search instead for 
Did you mean: 

Average value of next 3 periods

Former Member
0 Kudos

Hi All,

My scenarios it to get the average of next 3 periods of KF1 into KF2.

I tried to simulate the settings of ActualsPriorYear key figure from SAP2 mode in my KF2 , but it did not solve the problem. I might be missing something. I followed the below steps.

1. Created 3 different planning levels - Perprodcust1 , perprodcust2 and Perprodcust3

2. Created a key figure as an attribute - PeriodID2 with 3 calculations ( screenshot below)

3. Created 3 new key figures to hold data of N+1, N+2 and N+3 periods of KF1

4. In the calculations of above 3 key figures, I have assigned the 3 new planning levels. (screenshot below)

Provided below is the key figure as an attribute created for the same. Any thoughts on how to meet this specific scenario using IBP

Accepted Solutions (1)

Accepted Solutions (1)

pramod_mane2
Participant
0 Kudos

Hi Vijay,

Here is the configuration to come up with  average of 3 months starting from current month

Steps:

Assume PERPRODCUST is the base planning level and monthly time granularity

1. KF1@ PERPRODCUST = IF ((PERIODID - $$PERIODIDCU$$ <= 2) and (PERIODID -        $$PERIODIDCU$$ >=0) , CONSDEMANDQTY,null)

  

     Extract the values for Current Month, M+1 and M+2

2. Add additional calculation. This will sum up all the values for Current Month, M+1 and M+2

    KF1@PRODCUST = SUM(KF1@ PERPRODCUST)

3.

    a. Create a helper key figure HKF1@PRODCUST to calculate average

        HKF1@ PRODCUST  = (KF1@PRODCUST / 3)

    b. Create helper key figure and pass input key figure with time dimensions for e.g. KF    

        DMDPLANQTY

       This will put the average value in Current period.

       HKF1@PERPRODCUST = IF ((PERIOIDID=$$PERIODIDCU$$), HKF1@ PRODCUST, null))

    c. KF2@PERPRODCUST = HKF1@PERPRODCUST

Hope this helps.

Thanks,

Pramod

Former Member
0 Kudos

Hi Vijay,

If your question is answered, please mark this as answered. This helps to provide quick response to the questions, which is really not answered.

Regards

Rinju

Former Member
0 Kudos

Hi Pramod,

Thanks for the insight. Will the below calculation also work (average for next 3 periods)) for future periods?

HKF1@PERPRODCUST = IF ((PERIOIDID=$$PERIODIDCU$$), HKF1@ PRODCUST, null))


Regards,

Aditya G

Former Member
0 Kudos

Hi Pramod,

I had a couple of questions on the configuration.

1. I am not aware of the element - $$PERIODIDCU$$ . Is it some specific level I need to create a prerequisite? or Can I use this formula as is. What does $$ signify in this element.

2. How do I modify this configuration, if I were to do a average of past 3 months, instead of next 3 months.. Would it be a simple change to the expression as

((PERIODID - $$PERIODIDCU$$ <= 2) and ($$PERIODIDCU$$  - PERIODID  >=0)


Thanks

Vijay

Alecsandra
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Vijay,

$$PERIODIDCU$$ is a fixed variable that you can use in your calculations to return the current period.

Each period has an ID you define at time profile level, so basically with this calcualtion you substract the IDs.

You can find more explanations in IBP guide.

http://help.sap.com/download/ibp/ibp40_model_ref_en.pdf

Regards

Alecsandra

Former Member
0 Kudos

Hi Alecsandra,

Thanks for the input. It helped me in understanding the logic for previous month copy.

To do a quick check, I created below calculation to copy previous month data from saleshistory key figure to previous month sales history key figure. Both key figures are at same base planning level.


However the below calculation is not working. Do you have any inputs on what might be the issue here.

former_member217157
Active Participant
0 Kudos

Hi Vijay,

1. This is a calcualted KF, so you should remove stored in KF definition

2. Make sure that the request level calculation does not have stored flag checked in the KF input dialog.

3, Check the KF input (stored/calculated) for the second calculation.

You can refer to Model Configuration Guide for a similar example: http://help.sap.com/download/ibp/ibp40_model_ref_en.pdf Pg 49

Hope this helps,

Thanks,

Raghav

Krishna1
Participant
0 Kudos

Hi Pramod,

I like your suggestion very much....Very smart solution!!!! I never thought planning level cam exist without a time period dimension.

I have some thing similar need and your suggestion will make my life very easy...

Thanks,

Krishna

Former Member
0 Kudos

Hi Alecsandra,

I need to create a KF calculation where,

Past month value (Suppose July) of KF1 is current  month value (Suppose August) for KF2.

How can we achieve this?

Thanks,

Samiksha

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

I created as following Key figure definition and calculations to copy past 3 periods value from "ZMDYOSOKU" to "ZSALECOEF".

However occurs error in Activating situation as below.

Log:

---------------------------------------------

E - Ensure that calculation 276 | ZSALECOEF@REQUEST is included in the generated calculation definition graph

E - Ensure that calculation 150993738 | ZSALECOEF@WKPRODLOC is included in the generated calculation definition graph

E - Validation check failed

---------------------------------------------


Please could you provide me a solution?


regards,

Sheng Lu



Former Member
0 Kudos

Hi Sheng,

Hope you are doing well!

Can you see the difference of key figures on RHS between REQUEST level and WKPRODCUST level? I can see ""@WKPRODCUST missing.

Regards,

Aditya G

parag_bakde
Explorer
0 Kudos

Hi Vijay,

Will you be upgrading to new service patch 4.0 SP2 that is released this month, If yes then you can use the copy operator with and time shift parameter that will do a copy with +1 +2 and +3 time shift for you then you can average it within current time bucket based on newly created KF.

If not then you may need to do an snapshot of period offset KF that you had created to do an average. I don't think so you can do an period transformation and calculation on top of it.

Regards,

Parag,