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: 
CHansford
Luminary
Luminary

RAG Values

Hi Qlik Community,

I'm pretty new to this Qlikthing and I must say I'm pretty impressed with it.  Anyway I'm trying to change the background colour in a Straight Table to the field value (Red,Amber/Red,Amber,Amber/Green and Green) have managed to do it using a number value (1=Red through 5=Green) using Colourmix, but I just want to be able to use the Field value string.  Any help or suggestions would be appreciated.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

=Match(FieldValue, 'Red', 'Amber/Red', 'Amber', 'Amber/Green', 'Green')

should translate your FieldValue strings to numbers from 1 to 5. Replace FieldValue with your field name.

You can create a dual() value in the LOAD script:

LOAD

     Dual( FieldValue, Match(FieldValue, 'Red', 'Amber/Red', 'Amber', 'Amber/Green', 'Green') ) as FieldValue,

     ...


Then you can use FieldValue directly in any function that needs a numeric value.


View solution in original post

2 Replies
swuehl
MVP
MVP

=Match(FieldValue, 'Red', 'Amber/Red', 'Amber', 'Amber/Green', 'Green')

should translate your FieldValue strings to numbers from 1 to 5. Replace FieldValue with your field name.

You can create a dual() value in the LOAD script:

LOAD

     Dual( FieldValue, Match(FieldValue, 'Red', 'Amber/Red', 'Amber', 'Amber/Green', 'Green') ) as FieldValue,

     ...


Then you can use FieldValue directly in any function that needs a numeric value.


CHansford
Luminary
Luminary
Author

Swuehl, thanks for that, all worked a treat, now to find something harder to create