Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to write some logic for a traffic light within one of my tables (below). Basically, I want to set different bounds for what defines red, yellow, and green for EE Paid, ER Paid, and Other. Specifically, EE Paid should be green if Column 3 is >= 0.32 and yellow if Column 3 is between 0.28 and 0.31, and red otherwise. ER Paid should be green if Column 3 is >=0.04, yellow if Column 3 is greater than 0.02 but less than 0.04, and red otherwise. Other should be the same bounds as ER paid. I have the below code, but it's not working. Thanks for your help!
Code for Bounds:
Red: 0
Yellow: if(Payer='EE Paid', 0.28, if(Payer='ER Paid', 0.03, 0.03))
Green: if(Payer='EE Paid', 0.32, if(Payer='ER Paid', 0.04, 0.04))
Is this the goal?
Expression:
=If(Payer = 'EE Paid',
If(Column3 < 0.28, 'qmem://<bundled>/BuiltIn/led_r.png',
If(Column3 < 0.31, 'qmem://<bundled>/BuiltIn/led_y.png', 'qmem://<bundled>/BuiltIn/led_g.png')),
If(Payer = 'ER Paid',
If(Column3 < 0.02, 'qmem://<bundled>/BuiltIn/led_r.png',
If(Column3 < 0.04, 'qmem://<bundled>/BuiltIn/led_y.png', 'qmem://<bundled>/BuiltIn/led_g.png'))))
Is this the goal?
Expression:
=If(Payer = 'EE Paid',
If(Column3 < 0.28, 'qmem://<bundled>/BuiltIn/led_r.png',
If(Column3 < 0.31, 'qmem://<bundled>/BuiltIn/led_y.png', 'qmem://<bundled>/BuiltIn/led_g.png')),
If(Payer = 'ER Paid',
If(Column3 < 0.02, 'qmem://<bundled>/BuiltIn/led_r.png',
If(Column3 < 0.04, 'qmem://<bundled>/BuiltIn/led_y.png', 'qmem://<bundled>/BuiltIn/led_g.png'))))
Perfect! Thank you!