Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
raZor
Contributor III
Contributor III

If Match replace

Hi Qlikers,

ColA, ColB, ColC,Result

A, B, B,A

B,B,C,C

C,A,C,C

D,D,A,A

 

Here if colA value is exactly same as ColB then in result take ColC as result

and if ColA not exactly same as ColB then take ColA as result

Regards,

 

Labels (2)
1 Solution

Accepted Solutions
steeefan
Luminary
Luminary

Yes, that will work. Same as the expression I posted above, just omit AS Result:

  • If(ColA = ColB, ColC, ColA)
  • If(match(ColA, ColB),ColC,ColA)

View solution in original post

3 Replies
steeefan
Luminary
Luminary

In the script editor: If(ColA = ColB, ColC, ColA) AS Result

If it should be chart expression, omit AS RESULT.

raZor
Contributor III
Contributor III
Author

Will this work? If(match(ColA, ColB),ColC,ColA) on front end, I can not use in script.

Thanks in Advance 

steeefan
Luminary
Luminary

Yes, that will work. Same as the expression I posted above, just omit AS Result:

  • If(ColA = ColB, ColC, ColA)
  • If(match(ColA, ColB),ColC,ColA)