
Contributor
2024-02-21
12:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Labels
- Subscribe by Topic:
-
dimension
-
expression
-
filter
-
General Question
-
Set Analysis
-
Visualization
578 Views
4 Replies

MVP
2024-02-21
01:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use in BG color code
=if(%loss < 1.23%, 'green', if(%loss > 1.23%, 'red', 'white'))
555 Views

MVP
2024-02-21
01:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use this also
=if(%loss < 1.23%, 'Below Target', if(%loss > 1.23%, 'Above Target', 'On Target'))
554 Views


Partner Ambassador/MVP
2024-02-21
01:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,

Contributor II
2024-02-22
02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You put this expression in background colour - If(%loss<=target,RGB(0,128,0),RGB(255,0,0))
533 Views
