cancel
Showing results for 
Search instead for 
Did you mean: 

KF calculation only for values where time period (year) < current year

peter_casper
Contributor
0 Kudos
673

Hi all,

I set up a stored/calculated key figure which values are a combination of its own values and values of another key figure. I applied the following logic which works perfectly fine:

KF1@LOCPRODCUSTWEEKLY = IF(ISNULL("KF1@LOCPRODCUSTWEEKLY"), "KF2@LOCPRODCUSTWEEKLY", "KF1@LOCPRODCUSTWEEKLY")

So in case the value of KF1 is NULL, the calculation logic takes the values of KF2. Pretty straight forward.

However I want to apply the above logic only for periods which year is less than the current year, i.e. only for periods of 2019, 2018 and so on. I already tried to incorporate the statement ""PERIODID6" < "$$PERIODID6CU$$"" but the system complains during activation that PERIODID6 isn't part of the input.

Did anyone apply a calendar year check so that a particalur routine only kicks in if the year of the period at any level below falls under this criteria?

Cheers, Peter

Accepted Solutions (1)

Accepted Solutions (1)

lokesh_reddy4
Active Participant

Hi Peter,

Please check your time profile if periodID6 is part of it.

And for 'Year' we use periodID1...

Thanks and Regards,

Lokesh

peter_casper
Contributor
0 Kudos

Hi Lokesh,


that was the necessary hint to check the correct period ID. I used PERIODID6 which actually does not even exist. For whatever reason I linked that ID with the yearly level. After a recheck and changed the logic to PERIODID1 and it works now.

Thanks for pointing out the obvious.

Cheers, Peter

Answers (1)

Answers (1)

Hi Peter,

we once had a similiar scenario (on monthly basis), but it looked as such:

KF1@PL1 = IF((PERIODID6 <= ($$PERIODID6CU$$ - 1)) OR (PERIODID6 <= ($$PERIODID6CU$$ - 2)), KF2@PL1, 0)

given, that PERIODID6 is part of planning level PL1.

I hope this helps (and all the best ;-))

Christian

peter_casper
Contributor
0 Kudos

Hi Christian,


thanks for your practical example. I already had a similar statement in place but obviously using the wrong (even a non existing) PERIODID. Sometimes it's the simple things which block the progress.

However, thanks for your input and help.

Best regards, Peter