Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
David_K
Contributor III
Contributor III

Traffic Light KPI

Hi All fellow Qlik users,

I have a set of KPI's that require to be graded in the traditional Red, Yellow, Green traffic light system.

My KPI's are:

<80% - RED

>=80% but <100% - YELLOW

>=100% - GREEN

I can get 2 parameters working OK (Red, Green) using the following expression

if(sum([Completed]/[Target])<0.8,'red',if(sum([Completed]/[Target])>=1,'green'))

I am struggling to work out how to put the "Yellow" section in the middle

Can anyone please help with a solution.

Many thanks in advance,

David 

2 Solutions

Accepted Solutions
rubenmarin

Hi, you can assume that if i't not red or green it should be yellow:

if(sum([Completed]/[Target])<0.8,'red',if(sum([Completed]/[Target])>=1,'green','yellow'))

Or add the check:

if(sum([Completed]/[Target])<0.8,'red',if(sum([Completed]/[Target])<1,'yellow',if(sum([Completed]/[Target])>=1,'green')))

View solution in original post

David_K
Contributor III
Contributor III
Author

Thanks for the reply - it works as I need it to.

View solution in original post

2 Replies
rubenmarin

Hi, you can assume that if i't not red or green it should be yellow:

if(sum([Completed]/[Target])<0.8,'red',if(sum([Completed]/[Target])>=1,'green','yellow'))

Or add the check:

if(sum([Completed]/[Target])<0.8,'red',if(sum([Completed]/[Target])<1,'yellow',if(sum([Completed]/[Target])>=1,'green')))

David_K
Contributor III
Contributor III
Author

Thanks for the reply - it works as I need it to.