Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
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
Honored Contributor II

Re: If(Match), If(NotMatch)

do you want to store this value in a variable?

try this:

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

MVP
MVP

Re: If(Match), If(NotMatch)

May be like:

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

Not applicable

Re: If(Match), If(NotMatch)

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