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

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
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.

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

=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
Champion III
Champion III

=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