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

Comparing two column

Hello,

I am new to Qlik sense and some help on comparing two column for match.

I have created one data module after joining two tables, and now, I want to compare two column of newly created data model and create new column under same data module with Flag, Yes/No based on match/unmatch condition.

For example- I have Table A and B which has two similar column A1 and B1 respectively,  I have created one Data module after Left join on these two tables containing both column A1 & B1.

Now, I want to compare these two column for each records and write a new column to Data model say C with Yes/No based on match/unmatch condition.

Thanks in Advance for help!

1 Reply
JustinDallas
Specialist III
Specialist III

A simple If statement should suffice.

LOAD *,

If( A1 = B1, 'Yes', 'No') AS 'IsMatch'

;

LOAD * Inline

[

'A1','B1'

1 , 3

1 , 1

2 , 4

5 , 5

]

;