cancel
Showing results for 
Search instead for 
Did you mean: 

Key Figure synatx review

0 Kudos

Hi All,

Have a requirement to populate 1 if the week is in the future and zero if current or past. Also, the month has to be the current month.

When tying to create a KF with the following calculation, it gives me an error message.

'Specify at least one input for the CURRWEEKINDICATOR@REQUEST calculation definition.'

For the above requirement, what should be maintained as input and how?

See ss below.

Does it require any request level calculation too other than the logic mentioned below?

Even after setting the logic as max for request level and trying to maintain the calculation at wkprodloccust, getting the same error.

View Entire Topic
ayanbishnu1981
Active Contributor
0 Kudos

Hello az123

your KF CURRWEEKINDICATOR first need to have a calculation defined in the base PL (e.g WKPRODLOC, MTHPRODLOC, etc). In the base PL you just cannot define expression without 1 input KF. The input doesnt have to be in the expression.What you can do is, check the base PL of the KF and check what all other KFs exists in the same PL. You have to use any KF from that PL and add it as addtional input.please refer to the SS below.

0 Kudos

Hi Ayan,

Thanks on the clarification. Was able to proceed and can see the values.

The intention was to update 1 if the week was in the future. With the logic below, it is updating the current week too.

IF("KF1@WKPRODLOCCUST" OR "PERIODID3"="$$PERIODID3CU$$" AND "PERIODID5" > "$$PERIODID5CU$$", 1, 0)

any suggestion?

Thanks.

ayanbishnu1981
Active Contributor
0 Kudos

The way you have written the expression in not right. "KF1@WKPRODLOCCUST" this doesnt need to be put inside the expression.

Also instead of using IF use the JF

Use the below expression in the respective level

WKPRODLOCCUST (assuming that calwk is PERIODID5)

JF("PERIODID5">"$$PERIODID5CU$$" AND("PERIODID4"="$$PERIODID4CU$$"),1,JF("PERIODID5"<="$$PERIODID5CU$$" AND("PERIODID4"="$$PERIODID4CU$$"),0,NULL))

Now KF1@WKPRODLOCCUST needs to be used as addtional input, not directly in the expression.

Refer to the below SS