Discussion board where members can get started with QlikView.
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)
Have a look at the Match() function.
Best Regards, Bill
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)