Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
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

Tags (1)
2 Replies

Re: If or statement

Jono

Have a look at the Match() function.

Best Regards,     Bill

Not applicable

Re: If or statement

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)