Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
saa
Contributor
Contributor

Change the color of cell based on value condition

Hello, I would like to change the cell's color based on that cell's value. 

 

I am using a table and I have "MTD CY Actual" and "MTD PY Actual" Columns,  and I`ve created a measure that takes those differences(label of that column is "vs MTD PY Actual" (=MTD CY Actual - MTD PY Actual). I would like to color the cell red if "vs MTD PY Actual" is below zero,  and green if above zero.

However, below formula didn't work. 

=if('vs MTD PY Actual' < '0', Red(), Green()) --->  this made all cells green even i have some negative values. 

 

I have tried to use column() instead of the column's label but don't know the column numbers. and I'd prefer to go with the label rather than column no.  

Can you please help me? 

Labels (1)
0 Replies