Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have a problem with the property 'Text Color' of an expression.
The expression result is a %, when the % is >= 1 the text color should be green, if not then the text color should be red.
This is the function I'm using to acomplish that but every value turned red.
if((([#Gecontroleerde_Colli]) / ([#Colli_Picked]) >= '1.00'),green(),red())
8,30% should be green
0,09% should be red (this is ok)
0,18% ok
0,15% ok
4,49% should be green
Am I doing something wrong here, can someone please advice??? Included is a small testfile so it's better to understand what I'm trying to do.
Thanks in advance,
Monique
Hi Monique,
In your main expression you multiple by 100. If you do the same in your color expression you'll get 8,3 in green. Alternatively you can change the >= 1.0 to >= 0.01
= if(([Gecontroleerde_Colli] / [Colli_Picked])*100 >1.0,green(),red())
= if([Gecontroleerde_Colli] / [Colli_Picked] > 0.01 ,green(),red())
Hi Monique,
In your main expression you multiple by 100. If you do the same in your color expression you'll get 8,3 in green. Alternatively you can change the >= 1.0 to >= 0.01
= if(([Gecontroleerde_Colli] / [Colli_Picked])*100 >1.0,green(),red())
= if([Gecontroleerde_Colli] / [Colli_Picked] > 0.01 ,green(),red())
Hi Amber,
Instead of doing it using expression for the text color, you can make use of visual cues tab and get this done.
PFA.
Thanks
Sabal
HI Amber
Write the following Exp
in Text color of Exp
if((([Gecontroleerde_Colli]) / ([Colli_Picked])) >= '1',rgb(0,250,0),RGB(250,0,0))
Monique
Also you have used incorrect decimal and thousand separator in the Number tab. Have corrected them in my qvw.
A hughe thank you to everybody who has contributed to accomplish the correct result.
It's working fine now.
You're all the best ![]()