cancel
Showing results for 
Search instead for 
Did you mean: 

KF Calculation required in SAP IBP

reddyatoz
Explorer
0 Kudos
271

Hi All,

please help me with the KF Expression for below mentioned calcualtion.

IF A is Number AND B is >0 then we use C-D other wise it should be "0".

Like if(number(A),B>0,C-D,0). what function do i need use to find if it is number in KF "A".

Accepted Solutions (0)

Answers (2)

Answers (2)

chris_topf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello KUMAR R,

there is one thing to keep in mind in creating this calculation. If A is null, Praveen's example calculation will return a null value. Any calculation will return a null value regardless of how it is written, if any key figure in the calculation is null and the calculation doesn't have an ISNULL check. This is mentioned in the Help portal link Praveen provided. This is because null isn't a value that you can compare in an expression (i.e. NULL > 0, NULL = 4, etc).

So in regards to A, if it isn't a number, what else can it be?

Another way to write Praveen's example is: IF(ISNULL("A"), 0, IF( ("A"**2 > 0) AND ("B" > 0), "C" - "D", 0))

Regards,
Chris

Praveen_Jadhav
Participant
0 Kudos

Hi reddyatoz,

For Commonly used functions and expressions, refer SAP IBP help: Commonly Used Functions and Expressions | SAP Help Portal.

For your case one of the ways, you can write the KF logic is: IF( ("A"**2 > 0) AND ("B" >0) , "C" - "D" , 0)

So, if "A" is really a number, then square will always be greater than 0. Else it will throw 0.

Regards,

Praveen

reddyatoz
Explorer
0 Kudos

Hi Praveen,

Thanks for the response.

In my case "A" is stored KF and if user not maintained any value or it is NULL.

Then what will be the output for KF.

Br

Kumar