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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

text color Expression help?

Hi,

I'm trying to create an expression, in an expression text color, to turn different colors when certain conditions are met.

If a single record of [Expression1] is 0 then Red,

And/Or

If 2 or more records of [Expression2] are 0 then red,

If Sum([Expression1]+[expression2]+[expression3]...] >= 20 then Green

else black

I can't figure out the syntax on this one.  Could someone please help?

Thanks in advance.

Brian

3 Replies
NickHoff
Specialist
Specialist

Can you be more specific on your current expressions?  Also, the type of chart you are using?

Not applicable
Author

Thanks for the reply, Nick,

The expression I want to place this text color expression into is a simple expression where it adds all of the expression ‘scores’ of the table into a total. Each expression in the table is basically an if statement for scoring system. For example if Test Score1 >=.85, 4, 0; if Test Score2 >.9,5,0…etc) The Total Score expression just adds the expressions up to a total score. The total score expression is where I need to add the text color expression.

NickHoff
Specialist
Specialist

IF(COUNT(TestScore1 = 1) AND TestScore1 > .85, Red()),

IF(COUNT(TestScore > 1) AND TestScore2 > .9, Red()),

IF(SUM([Expression1]+[Expression2]+[Expression3]) >= 20, Green()),

Black())