Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
amber2000
Creator
Creator

Expression property Text Color not working


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

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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())


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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())


talk is cheap, supply exceeds demand
Not applicable

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

sasikanth
Master
Master

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))

Not applicable

Monique

Also you have used incorrect decimal and thousand separator in the Number tab. Have corrected them in my qvw.

amber2000
Creator
Creator
Author

A hughe thank you to everybody who has contributed to accomplish the correct result.

It's working fine now.

You're all the best