Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Traffic lights settings

We use traffic lights in comparison with previous years, in the following case it is on the margin.
Now I would like to see when the percentage margin is negative, the meter is red, when it is positive the meter is green, and when it is 0, the meter is gray.
Now I've been working with the meter characteristics, but I fail to get the settings right.
Because if I add Segment 3 (gray) with a lower limit of 0, and
change the lower limit of Segment 2 (green) to 0.01, then he turns red in the table.

See also attached files.
Can someone help me with the correct settings? And is my formula correct?

Margin Variance:

If([Margin %
$(vPriorYear)]
=0,0,([Margin %
$(vMaxYear)]
- [Margin %
$(vPriorYear)]
) / fabs([Margin %
$(vPriorYear)]
))

//If statement needed for situation vPriorYear = 0
//fabs statement needed for situation vPriorYear negatief

Thanks in advance!

Mirjam

1 Solution

Accepted Solutions
Not applicable
Author

Solved as:

 

Segment 1      <0

Segment 2      0

Segment 3      0.001

View solution in original post

1 Reply
Not applicable
Author

Solved as:

 

Segment 1      <0

Segment 2      0

Segment 3      0.001