Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Traffic Light Gauge

Hi Guys,

I have been struggling to create a Traffic light gauge in a straight table.

What I would like to have, is a traffic light indicating the below.

IF([Variance]<0,RED()

IF([Variance] >0 and [Variance] <1,YELLOW()

IF([Variance]>1 , GREEN())

Variance the label name for an expression which calculates the variance between actual and budget values.  I get an error when creating a IF statement like the above, saying that there's an invalid token.

Nonetheless, I would really love to just have a 3 segment traffic light gauge, where the colours are based on the above.

Can anyone please assist?

Kind regards,

2 Replies
Highlighted
Champion II
Champion II

try below expression

IF([Variance]>1 , GREEN()

          ,IF([Variance]<0,RED(),Yellow() ) )

Highlighted
Master
Master

Hi Ruan,

Here's an alternative to nested ifs that I think is easier to read but it's really just a matter of taste.

Pick(

Match(

-1,

[Variance]<0,

[Variance]<1,

-1),


Red(),

Yellow(),

Green())


Cheers


Andrew