Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If(Match), If(NotMatch)

Hi Experts,

I am trying to assign values to a field. Please help me understand if it is possible to do this,

If(Match(Tpcode, '91A', '92A','93B', '94D','95C'), (Tpcode) ,(If there is no match, then assign that value and store it as Tpcode2.

E.g.

Based on the above statement, if there are macthing values in Tpcode 91A and 92A, then Tpcode2 will have those values, Can I do something where Tpcode does not have ,'93B', '94D','95C' and I can assign these values to Tpcode2?


Please help!!!

3 Replies
sushil353
Master II
Master II

do you want to store this value in a variable?

try this:

pick(Match(Tpcode, '91A', '92A','93B', '94D','95C'),'Tpcode','Tpcode2')

tresesco
MVP
MVP

May be like:

If(Match(Tpcode, '91A', '92A','93B', '94D','95C'), Tpcode, Tpcode2) as Tpcode2

Not applicable
Author

Thanks for replying Sushil. I am beginner. Can you please show me how to do this?