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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
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