Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

If statement in Script

My field is CustomerType. 

I want to transform the field so that if CustomerType IS NOT Equal to a value then name it something else.

I tried the following structure but am not receiving expected results. Am I using an incorrect operator?

IF(CustomerType <> 'Broker' or 'Reseller' or 'House' or 'Player' or 'Sponsor' or 'Employee', 'Personal',
IF(CustomerType = 'Broker' or 'Reseller', 'Reseller')) AS CustomerTypeNew,

 

1 Solution

Accepted Solutions
sunny_talwar

May be this

If(not Match(CustomerType, 'Broker', 'Reseller', 'House', 'Player', 'Sponsor', 'Employee'), 'Personal', If(Match(CustomerType, 'Broker', 'Reseller'), 'Reseller')) as CustomerTypeNew,

View solution in original post

1 Reply
sunny_talwar

May be this

If(not Match(CustomerType, 'Broker', 'Reseller', 'House', 'Player', 'Sponsor', 'Employee'), 'Personal', If(Match(CustomerType, 'Broker', 'Reseller'), 'Reseller')) as CustomerTypeNew,