Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

Text Color Based on Expression for Comparison

Hi Guys,

I have a straight table which contains 2 columns, Avg. Selling Price (ASP) for 2018 and ASP for 2017, Customer wise. I want a comparison between these 2 columns in such a way that if value in ASP 18 column  is greater than the corresponding value in ASP 17 column, the text in ASP 18 should appear in green and red if lower. How can this be achieved?

Formula I used for ASP calculation is Value 18/Volume18. Please advice.



1 Reply
Valued Contributor

Re: Text Color Based on Expression for Comparison



IF(Expression from first column > Expression from second column,RED(),GREEN())

You can change RED() and GREEN() with RGB codes if you like RGB(255,0,0) for example.