I am trying to set a traffic light based on a value of a particular field. The field is a status field. It has 3 possible values. I would like the traffic light displayed green, yellow or red depending on the value of the field (text value). I have searched the forums and tried over and over to get this to work.
Can someone please explain something from begining to end. I'm assuming I must use a table chart. I tried this and couldn't get it to work. It's basically a report that's displayed and I want the last column to display a traffic light based on one of the fields value (remember it's a text value like ONTIME, LATE and NOTDELIVERED). ONTIME = green, LATE = red and NOTDELIVERED = yellow (all traffic lights.
I'd probably make your status field a dual() field:
dual(Status,match(Status,'ONTIME','NOTDELIVERED','LATE')) as Status
While you will still normally see Status as text, it then also has an underlying value of 1, 2 or 3. That allows you to set up a traffic light for the field just like you would for any other numeric field.
Hi John, I used the function you mentioned and for the first time got past 'Error in expression' message. Now, where do I put the Ontime = 1 and green traffic light, notdelivered = 2 and yellow traffic light and late= 3 red traffic light?
I put in Representaiton - Traffic Light Guage. Then go into Guage settings and don't know what to put here.