Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to in my grid chart show positive values in green and negative values in red.
My values are in percentages.
So far I have been able to make them green for positive, but the negative values won't show up at all.
I entered this formula into the expression background color definition:
If(Avg(Growth)<0,RGB(Avg(Growth)=255,0,0),RGB(Avg(Growth)=0,128,0))
and I get this:
How do I make the negative percentage values appear and then turn red? Is there somewhere else I should enter the formula or is there a better way to go about it than a formula?
Thanks.
Hi,
please can you post a Qvw example?
Is simplest to answer to you.
Giuseppe
We also have a funtion Red().
Did you tried?
What are you trying to achieve with RGB(Avg(Growth)=255, as this will almost certainly always be 0 (Qlikview number representation for false, -1 for true), the color for red always becomes RGB(0,0,0) which is black.
Try
If(Avg(Growth)<0,RGB(255,0,0),RGB(0,128,0))
Hi,
the Background colour expression should more like:
If(Avg(Growth)<0, Red(),Green())
See Simple example attached
Andy
Thank you Piet this works!
You're welcome Danielle
If this has answered your question, can you please mark the relevant answers as Correct? It will close this thread and help others find correct answers and let contributing members know this requires no more attention.