Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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