Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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.
what's the qlik sense object are you talking about?
Hi erica,
If you mean the KPI object, there are the bellow options to do that (my limit is 200k, so above that green and up arrow, bellow that, red and down arrow).
The object is a chart, and I want to make the background of a field change colors
if(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)>(Target+(.05*Target)),'green', if(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)>(Target-(.05*Target)),'yellow','red'))
So I think I'm close, but it still isn't working properly. if the value is higher than the target it is returning red
try this
if(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)>(Target*(1.05)),'green',
if(Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)>=(Target*(0.95))
and (Sum(Met_Goal_Flag)/Count(Met_Goal_Flag)<=(Target*(1.05)),'yellow',
'red'))
Now only the yellow is working
Would you be able to provide me your sample data/app?
=If(Sum({<[Month/Year]={'8/1/2017'}>}COMM1) > 30, RGB(0,255,0),
If((Sum({<[Month/Year]={'8/1/2017'}>}COMM1) >= 10 and
(Sum({<[Month/Year]={'8/1/2017'}>}COMM1) <= 30)), RGB(255,255,0),
If(Sum({<[Month/Year]={'8/1/2017'}>}COMM1) < 10, RGB(255,0,0)
)
)
)
It was bracketing issue