Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Traffic light gauge

I need to list tasks and the status of tasks in a table. the status of each task is either complete or not complete.

I want to have the traffic light gauge in a table next to the list of each task. if its complete it should be green if its not complete it should be red

thanks!

8 Replies
maxgro
MVP
MVP

in your qlikview installation folder (mine is C:\Program Files\QlikView\Examples\Documents), search for Data Visualization.qvw

You find in tab KPI a traffic  light gauge, just copy it and adapt to your requirement

1.png

Not applicable
Author

Hi.

I think that in this case, the easiest solution is to use tab "Visual Cues" in Chart Properties. I prefer to work with numbers in this situation, so you can add new field if the "status field" is text. You can try with ApplyMap or IF functions to insert numbers for example 0 - Not Complete 1 - Complete , and 2 - Others (Errors) . This will help you to clean your database.

This is solution for Pivot or Straight Tables but there are most useful in this cases when you have a lot of orders and invoices and you want know what is the status.

Not applicable
Author

This is very helpful thanks but can you be more specific on how to "work with numbers in this situation" I am new to qlikview and I don't know how to use/find applymap or if functions.

Thanks!

Not applicable
Author

Ok.

I mean to create new field in the script , the script has to be something like that: :


LOAD

........

Status,

IF (Status = 'NonComplete' , 0, IF(Status = 'Complete', 1, 2 )) as NewField

........

FROM  ABC.qvd


With this "NewField" you can work easier because the numeric fields are better for work in QlikView.

If you have some fields with value 2, you have errors in the database, because this fields are not 'Complete' or 'NotComplete'.

Also, when this field is numeric you can easier use Visual Cues.

You have to add this field like a expression, because Visual Cues work with expression. If doesn't work correctly add sum or the expression has to look like that sum(NewField) . After that everything it will be Ok.

I think this is the best solution for you at this time.

Regards,

Venelin

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you want numeric values to use in Visual Cues, there is no need define an additional field. Instead create the field as a dual() in the script -- with both a string and numeric value.

For an example of using a Dual() with Visual Cues, see

Qlikview Notes: Performance Tip - Using Dual() and Chart Visual Cues

-Rob

Not applicable
Author

Thank you

It's look like faster

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can add an expression to your chart like:

if(Status='complete', 0, 0.5)

and set the expression representation to Traffic Light. Go into the gauge settings to get it the way you want it.

I think an easier way is to use images using the QV built-in images.

=if(Status='complete

,'qmem://<bundled>/BuiltIn/led_g.png'

,'qmem://<bundled>/BuiltIn/led_r.png'

)

Set the expression representation to "Image" and you are done.

-Rob

Not applicable
Author

Very helpful post!