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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Set Color for Negative Variations

Hello,

 

I have the following expression for the Last Year Variation:

SalesCY / SalesLY - 1

 

It works perfectly and I use the this expression to set the color:

IF ((SalesCY / SalesLY - 1) > 0, Green(), Red())

 

The thing is that I have a case where:

SalesCY are -800 and SalesLY are -250

So the Last Year Variation shows me around 220% in Green.

 

The thing is that it should be in Red, because Current Year (-800) are worse than Last Year (-250).

Is there any way to fix that? (Please note that I have positive values for Sales too, so it should work for both)

Thank you!!!

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Maybe just change your expression to set the color:

IF(SalesCY > SalesLY , Green(), Red())

View solution in original post

1 Reply
m_woolf
Master II
Master II

Maybe just change your expression to set the color:

IF(SalesCY > SalesLY , Green(), Red())