Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field with 5 possible text values -
Far ahead
Ahead
On track
Behind
Far behind
I would like to create a traffic light gauge with a colour for each of the five values e.g. red for 'far behind', green for 'far ahead' etc. How do I do this?
Thanks
Greg
Match does not allow for set analysis.
You can try using the only function inside:
pick(match(only({<FIELD2 = {'x'}>}FIELD), 'Far ahead', 'Ahead', 'On track', 'Behind', 'Far behind'), 5, 4, 3, 2, 1)
Hope this helps!
Hi Greg,
I assume that field is the result of a calculation?
Just create a traffic light gauge and assign five segments to it - untick the checkboxes at the bottom, then you can assign a starting_value for each segment. They need not necessarily be equally distributed, but since you have five values, that seems the easiest.
The only problem is, you cannot assign text_values to those segments, so you need to map them with numeric values - you can do that via a mapping table and the ApplyMap() command.
Hi,
May be like this.
Regards
ASHFAQ
Thanks for your response.
The field is the result of management judgement rather than a calculation.
I am not familiar with mapping tables or the ApplyMap() command. Would you be willing to supply an example?
Thanks
Greg
You can always use pick(match()). Then just use different segments for what you want. For example:
pick(match(FIELD, 'Far ahead', 'Ahead', 'On track', 'Behind', 'Far behind'), 5, 4, 3, 2, 1)
Hope this helps!
Hi,
Have you look at my application.
Regards
ASHFAQ
Thanks. How would I apply your expression to work out a traffic light value for each of the areas in the following data:
Greg
YOU MEAN THIS?
You can always use pick(match()). Then just use different segments for what you want. For example:
pick(match(FIELD, 'Far ahead', 'Ahead', 'On track', 'Behind', 'Far behind'), 5, 4, 3, 2, 1)
Hope this helps!
OK. So this applies a numeric value to the FIELD values and I can now get the gauge to work nicely. Thanks!
How do I introduce another field into the expression? e.g.
pick(match(([$<OTHERFIELD={'x'}>} FIELD, 'Far ahead', 'Ahead', 'On track', 'Behind', 'Far behind'), 5, 4, 3, 2, 1))
But this doesn't work.
Thanks
Greg
Match does not allow for set analysis.
You can try using the only function inside:
pick(match(only({<FIELD2 = {'x'}>}FIELD), 'Far ahead', 'Ahead', 'On track', 'Behind', 'Far behind'), 5, 4, 3, 2, 1)
Hope this helps!