Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Julio_Freitas
Contributor
Contributor

Change the color of a measurement according to the goal

Change the color of a measurement according to the goal
Good afternoon!

I have a measurement called %loss and I need to change its color, to green if it is below the target and red if it is above the target.

 

To use:

2022 - target is 1.23%

2022 - target is 1.18%

2022 - target is 1.05%

I've tried using color - appearance and placing value, but without success

 

Labels (6)
4 Replies
Chanty4u
MVP
MVP

You can use in BG color code

=if(%loss < 1.23%, 'green', if(%loss > 1.23%, 'red', 'white'))

 

Chanty4u
MVP
MVP

Use this also 

=if(%loss < 1.23%, 'Below Target', if(%loss > 1.23%, 'Above Target', 'On Target'))

 

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

This is definitely possible to do. I'd create a table of Target numbers, associated with the corresponding Years. Then, you could formulate the color expression along the following lines:

IF([%loss] <= only(Target), Green(), Red())

If you need more detailed help on this, then create a small sample and attach it here. I will look into the issues that you might experience.

Cheers, 

Pallav
Contributor II
Contributor II

You put this expression in background colour - If(%loss<=target,RGB(0,128,0),RGB(255,0,0))