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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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!

Labels (1)
10 Replies
sunny_talwar
MVP
MVP

No problem Karthik

We are all glad to help.

Best,

Sunny