Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sharynwhite
Contributor
Contributor

QLIK Ignoring my <> logic

Hi Guys,

I entered the below logic into  my QLIK Chart but it is still pulling in purpose codes with a 61 attached.  

=if (([Regulatory Report Code]='2') and ([Purpose Code]<>36 or [Purpose Code]<>38 or [Purpose Code]<> 39 or [Purpose Code]<> 60 or [Purpose Code]<>61 or [Purpose Code]<>74) and( [Credit Limit Amount]>0) and ([Revolving Flag]='N'),'K207 IL', if(([Regulatory Report Code]='2') and ([Purpose Code]<>36 or [Purpose Code]<>38 or [Purpose Code]<> 39 or [Purpose Code]<> 60 or [Purpose Code]<>61 or [Purpose Code]<>74) and ([Credit Limit Amount]=0),'K207 IL', ))

I can tell you that when I export to Excel to review - Purpose Codes are formatted as text values (non-numerical).

There are also decimals (see attached).  

Can I use a WildMatch to change this format ? Can I use a NUM statement ? If so, how would I use Wild Match or Num in my Qlik logic?

 

1 Reply
Gysbert_Wassenaar

Your tests are incorrect

 [Purpose Code]<> 60 or [Purpose Code]<>61

If purpose code is equal to 60 then it is unequal to 61 so it passes the test since only one of the two conditions must be true. 

Try changing the or's to and's:

 [Purpose Code]<> 60 and [Purpose Code]<>61

Now both conditions must be true. Since a Purpose code with the value of 60 will fail the first condition then result of the entire test will be false.


talk is cheap, supply exceeds demand