cancel
Showing results for 
Search instead for 
Did you mean: 

KF Expression not working for NULL Values

0 Kudos
1,221

Friends,

Below is my KF Expression calling a Attribute Value from Location Product MDT, the condition is if the value is NOTEQUAL to L, then it should result the value as per expression, when its Equal to L, it should be ZERO.

Current Results: Works perfect when its L and Values exist in that Attribute (Anything other than L), when the attribute value is BLANK (NULL) it nullifies the values in output, rather the expectation is still returns the value..

Requirement is: If the Attribute value is L, then return as ZERO, else the KF1 value to be returned for any other conditions of NULL or Value Exists (Other then L)

IF("ATTR1"!=''L'',IF(ISNULL("ATTR1"),IF(("PERIODID3" >= "$$PERIODID3CU$$" - 12) AND ( "PERIODID3" < "$$PERIODID3CU$$" ),"KF1@MTHPRODLOCCUST",0),IF(("PERIODID3" >= "$$PERIODID3CU$$" - 12) AND ( "PERIODID3" < "$$PERIODID3CU$$" ),"KF1@MTHPRODLOCCUST",0)),0)

Please let me know why its not working when the Attribute Value is ISNULL?

Regards,

Guru

View Entire Topic
sap_km
Participant
0 Kudos

Hi Guruprasad,

In order to handle the NULL value you can try writing the below logic which will give you the expression value when the ATTR is NULL.

IF(ISNULL("ATTR1"),IF(("PERIODID3" >= "$PERIODID3CU$" - 12) AND ( "PERIODID3" < "$PERIODID3CU$" ), "KF1@MTHPRODLOCCUST",0),IF("ATTR1"! =''L'',IF(("PERIODID3" >= "$PERIODID3CU$" - 12) AND ( "PERIODID3" < "$PERIODID3CU$" ), "KF1@MTHPRODLOCCUST",0),0))

Hope this will help to resolve your issue.

Regards

Arif

0 Kudos

Hi Arif,

it works, not sure what was wrong in my expression...

I wrote ISNULL Later, in your expression you had written in first place, does it make any difference?

Thanks for your help!!

Regards,

Guru