Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple If statement using match help needed

if (not(Match([Workout Type],'Collections Repay','Conditional DIL','Conditional 'Repayment Plan (FHA)',
'ShortSale','VA Mod w/o Trial')and
                     (Match(
[Template Name],'HMP','ALT2011','APOLLO','MOD24')and
                                (Match(
[Workout Status],'WORKOUT APPROVED','TRIAL ON STREET','IN TRIAL','VERBAL ACCEPT RECVD'),1,0)))) as [TM Include Flag],

What I am trying to say here is that

a.       if the Workout Type is not one of 'Collections Repay','Conditional DIL','Conditional 'Repayment Plan (FHA)','ShortSale','VA Mod w/o Trial' and

b.      If the template name is one of 'HMP','ALT2011','APOLLO','MOD24' and

c.       If workout status is one of 'WORKOUT APPROVED','TRIAL ON STREET','IN TRIAL','VERBAL ACCEPT RECVD' assign a 1 for yes else assign a 0 for no

I cannot seem to get this code to work.  Anything wrong with the enclosing brackets here?

4 Replies
maxgro
MVP
MVP

if (not Match([Workout Type],'Collections Repay','Conditional DIL','Conditional Repayment Plan (FHA)', 'ShortSale','VA Mod w/o Trial')

  and Match([Template Name],'HMP','ALT2011','APOLLO','MOD24')

  and Match([Workout Status],'WORKOUT APPROVED','TRIAL ON STREET','IN TRIAL','VERBAL ACCEPT RECVD'),1,0) as [TM Include Flag]

Anonymous
Not applicable
Author

Looks like there are three unnecessary closing parenthesis at the end.

Besides, something is not right with the single quote between Conditional and Repayment.  It looks out of place.

MarcoWedel

-(not Match([Workout Type],'Collections Repay','Conditional DIL','Conditional Repayment Plan (FHA)','ShortSale','VA Mod w/o Trial')

  and Match([Template Name],'HMP','ALT2011','APOLLO','MOD24')

  and Match([Workout Status],'WORKOUT APPROVED','TRIAL ON STREET','IN TRIAL','VERBAL ACCEPT RECVD')) as [TM Include Flag]

hope this helps

regards

Marco

jagan
Luminary Alumni
Luminary Alumni

HI,

Try this statement

if (Not Match([Workout Type],'Collections Repay','Conditional DIL','Conditional 'Repayment Plan (FHA)', 'ShortSale','VA Mod w/o Trial') and
Match(
[Template Name],'HMP','ALT2011','APOLLO','MOD24')and
Match(
[Workout Status],'WORKOUT APPROVED','TRIAL ON STREET','IN TRIAL','VERBAL ACCEPT RECVD'), 1,0) as [TM Include Flag],

Regards,

Jagan.