Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Get the "or" to work in if statement or code

Hi,

I

ID,GROUP,CODE

1,BMW,YES

1,BMW,YES

1,VW,YES

2,FORD,YES 

2,BMW,YES

2,VW,YES

3,BMW,NO

3,VW,

4,FORD,YES 

Why doesn't this work in expression or code 

If( ID = 1 and Code = 'YES' and Group = BMW or group = VW ,1) 

 

Thanks

 

 

 

 

2 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @D19PAL ,

Change your expression as below

If( ID = 1 and CODE = 'YES' and (GROUP = 'BMW' or GROUP = 'VW') ,1)

or use this =If( ID = 1 and CODE = 'YES' and match(GROUP,'BMW','VW') ,1)

 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
D19PAL
Creator II
Creator II
Author

Thanks, I've done that bit now, 

Stuck here

I want to do an if statement in expression or code

 

The field CODE Yes or No

To pull in all or any No

To pull in yes or no

Cant pull in yes or yes's on on it's own a yes row will have to have a no row.

 

Thanks