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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
etrotter
Creator II
Creator II

Relative Text Color expression

Hi,

is it possible to write a relative text color expression? For example:

I would like if my expression is 5% below  target it to be red,

if it is 5% higher or lower than the Target it to be yellow,

and if it is 5% higher than it to be green.

is this possible? if so how would you write such an expression?

Thanks!

10 Replies
vvira1316
Specialist II
Specialist II

Were you able to change it to your need?

=If(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)>(Target*(1.05)), RGB(0,255,0),

If((Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)>=(Target*(0.95)) and

(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)<=(Target*(1.05)))), RGB(255,255,0),

If(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)<(Target*(0.95)), RGB(255,0,0)

)

)

)

I hope brackets in this one are right.

If so, can you please close the thread.