Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Bharathi09
Creator II
Creator II

Re: IF / OR STATEMENT HELP

Hi 

 

I have one requirement

I have dataset with columns parts and code

I need to add new country column in script like : 

if any of the code = 34 or 35 country = Canada 

if any of the code =14, 20 OR 43 country = Mexico

if any of the code = 34 or 35 and 14, 20 OR 43 country = Both

all this should be appear as country column

 

Please help

 

Thanks in advance



1 Reply
Vadimb
Partner - Contributor II
Partner - Contributor II

Hi,

try this

 

,if(WildMatch(code, 34,35), 'Canada'
,if(WildMatch(code, 14,20,43), 'Mexico'
,if(WildMatch(code, 34,35) AND WildMatch(code, 14,20,43), 'Both'))) as country