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

Traffic light issue

hi,

Please find the attached a copy of sample application, i am using traffic light in expression in an object.

i need, if value is positive then show green and if value is negitive then show red.

Kindly any solution.

Zain.

4 Replies
Not applicable
Author

Hi,

Right clik Chrt ->Expressions -> Gauge Settings...

     Set Min and Max as desired values (say -9999999 and 9999999),

Then for Segment 1, set Lower Bound as -9999999 and for Segment 2, 1(or as per requirements).

Hope this solves your issue!

Regards,

Anju

Not applicable
Author

Zain,

You can try this:

Change the Representation to Image for LED gauge and set the expression as:

=if(OD.quantity-OR.quantity>0,'qmem://<bundled>/BuiltIn/led_g.png','qmem://<bundled>/BuiltIn/led_r.png')

Additionally, if you need to change the numeric values to Red or Green, you can do it from Visual Cues tab in the chart properties.

visualcues.png

Please find QVW attached.

Hope that helps.

Regards,

-Khaled

Not applicable
Author

Thanks for your reply, I did before post but didnt success.

I resolved my problem and expression is (if(value<0,0,1)) and min 0 - max1 and segment 0 then red and segment 1 then green, its working fine to me.

Regards,

Zain.

Not applicable
Author

Thanks for your reply, I know that but user want traffic light, any ways i  done its.

Regards,

Zain.