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

If or statement

Hi

Can someone tell me how to use an If statement with an or

I am not to familiar with the syntax currently

I want to say If Cust = A or B then ..... etc

I know how to build the formula etc I just want to know what the cleanest way of using the Or formula is eg would I have to build it in as below

if(customer = 'A' or customer = 'B', 1,2)


or is there a cleaner way such as a If(customer = 'A' or 'B', 1,2)

Thanks

2 Replies
Anonymous
Not applicable
Author

Jono

Have a look at the Match() function.

Best Regards,     Bill

Not applicable
Author

Hi,

It seems, your IF syntax is correct. If you want to try bit different then use below expression:

IF(Match(customer, 'A','B') > 0, 1,2)