Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How can i fill color of gauge chart based on value of expression?

Hi,

I want to design a gauge chart where my range will be target value and expression will be my sales value.

And gauge chart should be filled with color depends on sales value.

Thanks in advance

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

At first, I define a variable which value is the total sum of my sales value. Then in expression i call the variable.

Then in presentation tab "Gauge setting tab" i define my min and max value from 0 to sum of my target.

After that i define my three segment and put the below formula in the color box:

=if( sum( TargetAmount) > 0.7, rgb(69, 234, 21),  if( sum( TargetAmount) > 0.5, rgb(255,255,0),  rgb(255, 0, 0)))

it works as i want...

Thanks

View solution in original post

5 Replies
bc-thebruuu
Creator
Creator

Can you provide an app and expected results?

Gauge colors are based on segments color definition:
you should set the segment min max based on sales values and the you may statically configure the color of each segment

bc-thebruuu
Creator
Creator

Here's an example.

Gauge is Green(segment 1) till 13 (value of first Data,A)

Then from 13 to 28, it is Red

and Please take a look @ Creating a Good Looking Gauge Chart in Qlikview

shansundar
Partner - Creator
Partner - Creator

Hi,

Give your Sales value as Segment 1 and the difference between Sales & Target as Segment 2.

Also check if Target > Sales, if not do the vice-versa.

Ex: Target = 500, Sales = 440

Then,

Segment 1 = 440 starting from 0 to 440 the color will be green,

Segment 2 = 500 - 400 which is 60 so starting from 441 to 500 the color will be Red.

Hope this helps.

Thanks,

Shan S

Anonymous
Not applicable
Author

Thank you all....

at last i find a way to do that....

Anonymous
Not applicable
Author

At first, I define a variable which value is the total sum of my sales value. Then in expression i call the variable.

Then in presentation tab "Gauge setting tab" i define my min and max value from 0 to sum of my target.

After that i define my three segment and put the below formula in the color box:

=if( sum( TargetAmount) > 0.7, rgb(69, 234, 21),  if( sum( TargetAmount) > 0.5, rgb(255,255,0),  rgb(255, 0, 0)))

it works as i want...

Thanks