Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
soniasweety
Valued Contributor III

Guage range

Hi all,

I want to show gugae chart based on range

My req below

100% guage should be used but green/yellow/red ranges should be as follows:

Green = 0 to 5%

Yellow = 6% to 15%

Red = 16% to 100%

Red = 16% to 100%

PFA.

Tags (3)
1 Solution

Accepted Solutions
MVP
MVP

Re: Guage range

try:

If((Sum([Year Salary])/Sum(total [Year Salary]))<=0.05, Green(),

  if((Sum([Year Salary])/Sum(total [Year Salary]))<=0.15, Yellow(), red()))

Capture.PNG

9 Replies
MVP
MVP

Re: Guage range

Like this?

Capture.PNG

soniasweety
Valued Contributor III

Re: Guage range

Thanks Tres,

But if want through an Expression how can i achieve this?

suppose same values for background colour  ?how can i write the expression?

MVP
MVP

Re: Guage range

Not really clear to me. Please explain a bit more, may be with a case.

soniasweety
Valued Contributor III

Re: Guage range

i want to show the colour  based on range which i mentioned above.  for that i need to write IF condition?

how to do ?

like below:

if(sum(sales  

Green = 0 to 5%

Yellow = 6% to 15%

Red = 16% to 100%

)                     i need to  IF condition.

Re: Guage range

Hi sony, If you want all of the same color you can keep only 1 segment and use conditional color to set the color of the segment, the conditional color expression can be:

If(expression<0.05, RGB(0,255,0),

If(expression<0.15, (255,255,0), RGB(255,0,0)))

MVP
MVP

Re: Guage range

In the bar chart, right?

soniasweety
Valued Contributor III

Re: Guage range

yes tres.

MVP
MVP

Re: Guage range

try:

If((Sum([Year Salary])/Sum(total [Year Salary]))<=0.05, Green(),

  if((Sum([Year Salary])/Sum(total [Year Salary]))<=0.15, Yellow(), red()))

Capture.PNG

soniasweety
Valued Contributor III

Re: Guage range

Thnks. its working fine