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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color in Gauge Chart

Hi

I am trying to show a bar in a straight table which has its color depending on a value

e.g. red if below 1 and green if above it

gauge.PNG.png

I have adjusted the gauge setting to:

gauge_2.PNG.png

the bar however always shows up in green? In the first 2 rows I wanted it to be red().

Labels (1)
4 Replies
stabben23
Partner - Master
Partner - Master

Hi,

use sum in our expression, now it will count FinanzenA.Wert and it always 1.

like this if(sum(FinanzenA.Wert <1,red(),green()))

and maybe you shold use aggr on your dimension, like if(aggr(sum(FinanzenA.Wert),FinanzenA.Bezeichner)<1........

//Staffan

Not applicable
Author

Hi

the formula you gave looks to have a syntax problem

I used  if (sum(FinanzenA.Wert) < 1, red(), green())

but this does not change the color either

Juerg

stabben23
Partner - Master
Partner - Master

Hi,

use a aggr function if(sum(aggr(sum(FinanzenA.Wert),FinanzenA.Bezeichner)<1,red(),green()))

//Staffan

Not applicable
Author

Thanks Staffan for your quick replies - however your formula still has a syntax problem and my changes to make it work have so far been of no success

Juerg

P.S. just saw that the color adjust correctly if only a single row is selected ...