Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
a-5
Contributor III
Contributor III

Conditional formatting in Qliksense table based on two cells

Hi,

 

I have a table including the actual results (sales) and targets per country and per product (see an example below). I would like to create a conditional formatting as follows: if sales higher or equal to target -> green; if sales lower than target -> red: 

alyytika_0-1702464009366.png

Can you please assist how to do this? I need to include both sales and target values in separate columns in the table, because the users need to see the actual sales & target values (not the difference or %).

Thank you in advance! 

Labels (1)
1 Solution

Accepted Solutions
Javizh
Partner - Contributor III
Partner - Contributor III

Hello @a-5 

You can do it using the "Background Color expression" configuration for each column in a simple table.

As you have the target next to the sales, you can use a formula like this:

  • IF(Column(1)>column(2),lightgreen(),lightred())*

*The colors "lightgreen()" and "lightred()" can be changed for HTML color codes, if you want different tones

Attached is a QVD example.

Hope its helpful.

View solution in original post

2 Replies
Javizh
Partner - Contributor III
Partner - Contributor III

Hello @a-5 

You can do it using the "Background Color expression" configuration for each column in a simple table.

As you have the target next to the sales, you can use a formula like this:

  • IF(Column(1)>column(2),lightgreen(),lightred())*

*The colors "lightgreen()" and "lightred()" can be changed for HTML color codes, if you want different tones

Attached is a QVD example.

Hope its helpful.

a-5
Contributor III
Contributor III
Author

Hi Javizh!

Thank you so much - it works perfectly!

-Anna