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: 
helen_pip
Creator III
Creator III

Text Colour in expression - not working for different targets

Dear Qlikview user

I have built a pivot table and for one expression I have put a character CHR(9711) (Which is a circle) in as the expression

My dimensions are Month year and Metric

In the text colour of the expression, I would like to change the colour, depending on the metric and the different target.  I have started to write the expression, but the expression is only ever working for the first metric I.e. Metric A and is ignoring the rest of my expression

Could someone kindly take a look and see what I am doing wrong

=If({$<TB_Question = {'Safe'}, TB_Metric = {'A'}>}TB_Value

<=2,

$(vColour_Green),

If({$<TB_Question = {'Safe'}, TB_Metric = {'A'}>}TB_Value

>2,

$(vColour_Orange),

If({$<TB_Question = {'Safe'}, TB_Metric = {'B'}>}TB_Value

=0,

$(vColour_Green),

If({$<TB_Question = {'Safe'}, TB_Metric = {'B'}>}TB_Value

>0,

$(vColour_Orange)

))))

Kind Regards

Helen

2 Replies
sunny_talwar

May be try using if statement:

If(TB_Question = 'Safe', If(TB_Metric = 'A', If(TB_Value <= 2, $(vColour_Green), $(vColour_Orange)),

                                    If(TB_Metric = 'B', If(TB_Value = 0, $(vColour_Green), If(TB_Value > 0, $(vColour_Orange)))))

I might have missed a parenthesis, but you get an idea

Not applicable

You write set expression, but set expression can works only with in aggregate functions like Sum, Count, etc...!