Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
=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.
=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.
Swuehl, thanks for that, all worked a treat, now to find something harder to create