cancel
Showing results for 
Search instead for 
Did you mean: 

KF Expression not working for NULL Values

0 Kudos
1,242

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
0 Kudos

Hi Ayan

Above expression on periodID is used to aggregate past data and pass on for last 12 months for further calculation..

Regarding your proposed expression, it’s not that straight forward, where you are not telling what happens when the Attribute value is blank, which is my main problem.


regards

Guru

AyanBishnu
Active Contributor
0 Kudos

If you have a different condition for NULL, you need to use the ISNULL() as well in your expression. for example ISNULL("ATTR1")