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: 
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 (2)
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...)