Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to compare the two columns in a same file

Hello All

 

I have a scenario, that am getting a file with multiple columns, with number of rows, out of that two columns data i need to compare, that two columns data must be exactly equal for every row, how to achieve that

 

example for good data 

 

col1 col2
Open Open
Open Open
Open Open

 

if i find That above data file is exactly valid

 

but if the data is in below format file is invalid , even if one row data not matched, i need to reject entire file

 

col1 col2
Open Open
Open Open
Open not open

 

 

Can anybody suggest good method to approach this

 

Thanks In Advance

Manish

 

Labels (4)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Using a tMap add the following expression to the output filter:
!(""+row1.col1).equals(row1.col2)
This way, invalid records will go to the output flow. Then check how records have been rejected to decide what to do with the file.

View solution in original post

2 Replies
TRF
Champion II
Champion II

Using a tMap add the following expression to the output filter:
!(""+row1.col1).equals(row1.col2)
This way, invalid records will go to the output flow. Then check how records have been rejected to decide what to do with the file.
Anonymous
Not applicable
Author

@TRF It worked for my requirement , thanks