Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
For display of traffic gauge lights, i am using the formula where
0 - Green
1-Amber
2-Red
=If((Column(3)/Column(2))*100 < '0%','0',If((column(3)/column(2))*100 > '0%' and (column(3)/column(2)) < '5%','1','2'))
But when the condition is 0%, it should show green but it is showing red.
Can someone help me with formula?
Regards,
KC
=If(Column(3) / Column(2) < 0 Or Column(2) = 0, 0,
If(Column(3) / Column(2) < 0.05, 1, 2))
Can you upload your qvw?
Andy
Hey Andy, Sorry but i can't
Will post something very similar that will help you to understand.
Regards,
KC
Try to take of all '
=If((Column(3)/Column(2))*100 < 0,0,If((column(3)/column(2))*100 => 0 and (column(3)/column(2)) < 5,1,2))
Feeling Qlikngry?
This will fix your expression:
=If((Column(3) / Column(2)) * 100 < 0, 0,
If((Column(3) / Column(2)) < 0.05, 1, 2))
But how are you getting from there to the colours RAG?
why are you using % .. by default QV returns in numbers have you specified anywhere to return in percent ?
use
=If((Column(3)/Column(2))*100 < 0,0,If((column(3)/column(2))*100 > 0 and (column(3)/column(2)) < 5,1,2))
Thanks
BKC
all other colors are working fine for you?
Hi,
All Rag's colors are working fine except for one. Posting an excel sheet with details.
Hope that will help.
Regards,
KC
Try this please:
=If((Column(3)/Column(2))*100 <= '0','0',If((column(3)/column(2))*100 > '0' and (column(3)/column(2)) < '5','1','2'))
If i simply use =(Column(3)/Column(2)) for calculation of Column 4, i am getting dash ![]()
So if column 3 = 0 and column 2 = 0
then column 4 will be 0% or - should return green color not red.
Am i making sense? Anything more than 5% should be red.
Regards,
KC