Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
francisco_cohen
Contributor III
Contributor III

Trafic light dashboard

Hi,

I want to create a dashboard in a semaphore/trafic light style.

My source data is:

ProjectStatus
Project 1-1
Project 20
Project 31

Note: -1 is Red, 0 Yellow and 1 is Green

My script:

LOAD

     "Project Code",

     "Status"

FROM [lib://Projects/projects.xlsx]

(ooxml, embedded labels, header is 2 lines, table is Milestones);

I want to build a dashboard, which would represent my status values in a trafic light, such like this:

Untitled.png

Thank you,

FC.

1 Solution

Accepted Solutions
shraddha_g
Partner - Master III
Partner - Master III

In table, For Status Column , instead of using any image you can set background color to give colors to display it as Traffic light

View solution in original post

3 Replies
vvira1316
Specialist II
Specialist II

Hi

See if attached will help you.

Traffic Light.PNG

SCRIPT


NoConcatenate
EmpData:
LOAD *
FROM
[..\Data\Test6.xlsx]
(
ooxml, embedded labels, table is Sheet1);

Images: 
BUNDLE LOAD * INLINE
ImageID, Path 
Red, ..\Data\Red.png
Green, ..\Data\Green.png
Yellow, ..\Data\Yellow.png
]
;

EXPRESSIOn

=If(Status=-1,'qmem://ImageID/Red',
If(Status=0, 'qmem://ImageID/Yellow',
If(Status=1, 'qmem://ImageID/Green')))

Regards,

Vijay

shraddha_g
Partner - Master III
Partner - Master III

In table, For Status Column , instead of using any image you can set background color to give colors to display it as Traffic light

francisco_cohen
Contributor III
Contributor III
Author

Thank you for your usefull response.