Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
Showing results for 
Search instead for 
Did you mean: 
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,


0 Replies