Skip to Content

Transfer Key Figures on level PRODCUST back to level PERPRODCUST

Dear experts,

I tried for the first time to utilize a planning level without time period profile (PRODCUST in comparison to PERPRODCUST) to perform a calculation similar as explained in this older post ().

As explained in the post, I performed the following 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

I really like the concept of utilizing the planning level PRODCUST. However, in Step 3b where the Helper Key Figure created at level PRODCUST is transferred to planning level PERPRODCUST, I receive an error:

The planning level for the output key figure and the planning level for the input key figure must match in the calculation definition.

As the input key figure HKF1@PRODCUST does not have PER as required for the output key figure HKF1@PERPRODCUST, I understand why the error pops up. Is there a flaw in the calculation, or did I miss something? My general question would be how it is possible to transfer a value of a KF at a level PRODCUST back to KFs on level PERPRODCUST.

Best regards

Holger

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 24, 2016 at 03:33 PM

    You can add a calculation:

    HNULL@PERPRODCUST = NULL (I/P: CONSDEMANDQTY@PERPRODCUST)

    Change 3b to:

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


    Thanks,

    Raghav

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Holger Eimla

      Hi Holger,

      The I/P means you add that additional KF to the Key Figure Input of the calculation.

      eg HNULL@MONTHPRODCUST =  NULL. Then click inputs button and choose CONSDEMANDQTY@PERPRODCUST)

      Hope this helps

      Regards,

      Raghav

  • avatar image
    Former Member
    Mar 24, 2016 at 02:23 PM

    Hello Holger

    The step 2. will already runs into error since the planning level attributes are different, I believe you can only do assignment instead of a SUM.

    Try KF1@PRODCUST = KF1@ PERPRODCUST.

    Regards.

    YS

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Holger Eimla

      Oh.. missed out that part. Sorry

      Can you calculate the avg at PERPRODCUST level via period transformation (-1 and -2 mth) and then reassign back to the PRODCUST level instead? Something like below thoughi am not sure if the IF condition is correct based on your requirement

      KF1@PERPRODCUST = IF (PERIODID = $$PERIODIDCU$$), (( CONSDEMANDQT@PERPRODCUST +

                                            CONSDEMANDQT@PERPRODCUST2 +

                                            CONSDEMANDQT@PERPRODCUST3) / 3), NULL)

      KF1@PRODCUST = KF1@PERPRODCUST

  • Mar 29, 2016 at 07:41 AM

    Thank you for your help Raghav and Yeu. With Raghavs additional comment I was able to make it work exactly as I wanted it to be.

    Add comment
    10|10000 characters needed characters exceeded

    • Hey Andre

      you should not re-open an old and already closed thread, but instead open a new referring to the old, next time please :-)

      However, general explanation is that all elements that are in the "left" side must be filled by the "right" side

      Raghavs recommendation was to replace the assignement of a simple NULL in the step 3b to HKF1@PERPRODCUST by a helper HNULL@PERPRODCUST which is NULL as well.

      The formula is simply HNULL@PERPRODCUST = NULL.

      But by marking an additional key figure on the same level PERPRODCUST in the input parameters of the formula, the requirement to have information for left side in the right side is fullfilled and the KF can be activated