Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
infock12
Creator III
Creator III

Multiple IF, PICK AND MATCH

Hello all,

I have a load script that I used to change the text in a field to a different text based on the Question number. This says that if the value of QuestionNumber 25 is 'Yes', change it to ;No' and vice versa.

IF(Match(QuestionNumber, 25), Pick(Match(CResponse,'Yes','No', CResponse),'No','Yes', CResponse) as Response;

How do I add another IF statement to say for QuestionNumber 26, if there is a 'No' response say 'Yes', but if there is a 'Yes' response, leave it as 'Yes'

I tried the below but it didn't work.

IF(Match(QuestionNumber, 25), Pick(Match(CResponse,'Yes','No', CResponse),'No','Yes', CResponse) AND IF(Match(QuestionNumber, 26), Pick(Match(CResponse,'No', CResponse), 'Yes', CResponse) as Response;

I tried connecting two IF statements with a comma instead of 'AND' but that did not work either.

Any help is appreciated!

10 Replies
sunny_talwar

No problem Karthik

We are all glad to help.

Best,

Sunny