### Copy KF values with condition from one KF to another

Hi Experts,

I have following situation where KF1 have values across Time horizon and KF2 have values only till 1st five years.

Requirement is to copy values of KF1 to KF2 for the years greater than 5, till end of Horizon and result shall be as below.

I have written following formulas for KF2 to achieve this, but result is not populated at all.

KF2@Request = Sum(KF2@WKPRODLOC))

KF2@YEARLOC = IF( (( "PERIODID1" - "\$\$PERIODID1CU\$\$" ) > 5) AND (( "PERIODID1" - "\$\$PERIODID1TO\$\$" ) <= 0 ), "KF1@YEARLOC" , 0)

Can you suggest what I am missing.

Thanks

Vilas Mhaisgawali

picture-1.jpg (42.2 kB)
picture-2.jpg (44.9 kB)
10|10000 characters needed characters exceeded

Apr 16, 2018 at 01:08 PM

Hi Vilas,

Without operator you could try below option-

1) Define a calculation of KF1 at WKPRODLOC using internal Join

KF1@WKPRODLOC = KF1@YEARLOC ---------> Input any Key figure at WKPRODLOC along with KF1

This makes KF1 available at WKPRODLOC

2) Use the above value to calculate KF2

KF2@WKPRODLOC = IF("PERIODID1" - "\$\$PERIODID1CU\$\$" > 5, KF1@WKPRODLOC, KF2WKPRODLOC)

3) Define request level calculation of KF2 as AVG since year value of KF1 is copied across all week in KF2 from 1st step

KF2@REQUEST = AVG(KF2@WKPRODLOC)

Thanks,

Rohit

10|10000 characters needed characters exceeded
• Apr 16, 2018 at 11:31 PM

Hi Vilas,

I understand this thread is a duplicate of https://answers.sap.com/questions/479285/copy-value-from-one-period-of-kf1-to-multiple-peri.html

If that's the case, please either close one of the threads, and we would suggest also to follow up on the original thread on this kind of cases.

Thanks for understanding;

Ivan

10|10000 characters needed characters exceeded
• Hi Ivan,

Although earlier thread was copying KF values, requirement was completely different hence created a new thread. I will close the earlier thread.

Thanks

Vilas

• Apr 16, 2018 at 09:33 AM

Hello Vilas,

You can use dis aggregation operator to copy value in target key figure since it is stored-

SOURCEKF = KF1

TARGETKF = KF2

ATTRIBUTE1 = LOCID

PERIODID = PERIODID1

PERIOD_OFFSET = Number of periods from where you want to copy.

Check more details in below help link-

DISSAG Operator

Thanks,

Rohit