Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Logic Issue

Can someone please help me with this logic.  I have 2 fields I am checking.  Both fields are blank and it's coming back with a mismatch. I have tried If(isnull(Davey_NextRenewalPODNP) and (len(NRC_SAP) = 0),0

Thanks

if(isnull(davey_NextRenewalPODNP) and (Len(NRC_SAP) > 0),1,
       if(isnull(davey_NextRenewalPODNP) and isnull(NRC_SAP),0,
              if(NRC_SAP  <> davey_NextRenewalPODNP,1,0)))  as NoMatchNRC
,

1 Solution

Accepted Solutions
sunny_talwar

Can you check using Len(Trim()) instead of IsNull()

If(Len(Trim(davey_NextRenewalPODNP)) = 0 and Len(Trim(NRC_SAP)) > 0, 1,
      If(Len(Trim(davey_NextRenewalPODNP)) = 0 and Len(Trim(NRC_SAP)) = 0, 0,
              If(NRC_SAP <> davey_NextRenewalPODNP, 1, 0)))  asNoMatchNRC,

View solution in original post

6 Replies
sunny_talwar

So you are facing a issue here?

if(NRC_SAP  <> davey_NextRenewalPODNP,1,0)

tmumaw
Specialist II
Specialist II
Author

No.  It's when they are both blank.

Thanks

sunny_talwar

Can you check using Len(Trim()) instead of IsNull()

If(Len(Trim(davey_NextRenewalPODNP)) = 0 and Len(Trim(NRC_SAP)) > 0, 1,
      If(Len(Trim(davey_NextRenewalPODNP)) = 0 and Len(Trim(NRC_SAP)) = 0, 0,
              If(NRC_SAP <> davey_NextRenewalPODNP, 1, 0)))  asNoMatchNRC,

dominicmander
Partner - Creator
Partner - Creator

Hi Thom,

As a test, try Ord() of both fields ... it could be that there is a "blank" character Chr(0) ... which is a character for a blank so fails the IsNull() and Len() tests.

tmumaw
Specialist II
Specialist II
Author

Thanks Sunny T.....

sunny_talwar

No problem