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: 
vmoreno2605
Creator
Creator

Convert if to PickMatch

Hi everyone!

One question, i have the following if:

if(Field1=Valuex1,

      if(Field2=Valuey1, Expression,

      if(Field2=Valuey2,Expression,

      if(Field2=Valuey3,Expression,

if(Field1=Valuex2,

      if(Field2=Valuey1, Expression,

      if(Field2=Valuey2,Expression,

      if(Field2=Valuey3,Expression

))))))))

I want to use pick match instead of that big if (it is even bigger)

Any ideas?

Thanks in advance

 

Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

What about something like this?

Pick(Match(Field1&'|'&Field2, 'Valuex1|Valuey1',  'Valuex1|Valuey2' ,  'Valuex1|Valuey3', 'Valuex2|Valuey1', etc...), Exp11, Exp12, Exp13, Exp21, etc...)

 

View solution in original post

1 Reply
Vegar
MVP
MVP

What about something like this?

Pick(Match(Field1&'|'&Field2, 'Valuex1|Valuey1',  'Valuex1|Valuey2' ,  'Valuex1|Valuey3', 'Valuex2|Valuey1', etc...), Exp11, Exp12, Exp13, Exp21, etc...)