Equation Not Working

2 posts / 0 new
Last post
ahibbard
Offline
Joined: 01/10/2018 - 09:25
Equation Not Working

Hi - 
I am new here and very new to the IDEA software.  I've been able to use it to some success with the help of online training modules, but I am running into an issue that I cannot resolve.
 
I have a database with 41,658 records, and I am using a field I've named "Loan_Code" as the main sort criterion.  I am all the records that:

  1. have a specific loan code (62 in total), 
  2. have balances not equal to zero, and
  3. have charge off amounts that ARE equal to zero.

 
My equation looks like this: (LOAN_CODE<>"CODE1" .or. LOAN_CODE<>"CODE2" .or. LOAN_CODE<>"CODE3"......LOAN_CODE<>"CODE62") .and. CURRENTBALANCE<>0 .and. CHARGEOFF = 0
The output returns more than 8,000 records.  The balance and charge off parameters are working properly, but for some reason that I cannot figure out, records are on the output that contain Loan Codes that I've tried to exclude.  For example, the output includes records with a Loan code of CODE1.
I'm hoping maybe someone has some insight to what I may be doing wrong.  I've run the equation check and it passes (obviously, or I wouldn't be able to run it", and I've verified there are no typos...four times.  
Thanks in advance.
Aaron
 
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Aaron and welcome to the site.

There are two ways you can do this, the first is to change your .or. to .and. for the LOAN_CODE section.  Using the AND forces the equation that none of them can be true, using the OR allows one to be true which is probably why your are not getting the expected results. 

A better way to do the first part is to use the @NoMatch() function.  So in your case it would be:

@NoMatch(LOAN_CODE, "CODE1", "CODE2", CODE3", ...) so you would add all the codes you don't want to the list and that should get your equation working.

Good luck in your project.

Brian