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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

data load editor multiple if statements

this is the code i'm using ,

if([Field_Name] = 'name1' or 'Name2',1) as key.

however qlik is not assigning the value for my second field Name 2.

2 Solutions

Accepted Solutions
Digvijay_Singh

It should be like this - 

if([Field_Name] = 'name1' or [Field_Name]  = 'Name2',1) as key

View solution in original post

MayilVahanan

Hi 

Try like below

if(Match([Field_Name], 'name1', 'Name2'),1) as Key

or

if(WildMatch([Field_Name], 'name1', 'Name2'),1) as Key

Wildmatch is incase-sensitive.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
Digvijay_Singh

It should be like this - 

if([Field_Name] = 'name1' or [Field_Name]  = 'Name2',1) as key

MayilVahanan

Hi 

Try like below

if(Match([Field_Name], 'name1', 'Name2'),1) as Key

or

if(WildMatch([Field_Name], 'name1', 'Name2'),1) as Key

Wildmatch is incase-sensitive.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.