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: 
snehal1405
Contributor II
Contributor II

Compare two column values and create a new column

Hi Everyone,

I'm trying to compare values from 2 columns and mark the comparison in a new column with up and down arrow indicators as shown in the picture attached.

I applied if() condition logic:

if(Column(1) = 'NA' or Column(2) = 'NA', 0,
if(Column(1) > Column(2), 1,
if(Column(2) > Column(1), -1)))

The output is attached in the image.

I'm trying to implement a range condition of difference within + or - 5% between column 1 and column 2 values instead of "=NA"  for getting the 0 value.

Please Let me know your thoughts.

Thanks in advance,

Snehal

0 Replies