Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
oric1884
Contributor III
Contributor III

Bar Chart: How to Define Color's Bar Based on Its Value?

Hi there!

I created a Bar Chart using the following data source:

AggregationScope:

LOAD * inline [

  Year Quarter Amount

  2012 Q1 1100

  2012 Q1 1000

  2012 Q2 1700

  2012 Q2 1500

  2012 Q3 1400

  2012 Q4 1800

  2013 Q1 1000

  2013 Q2 1300

  2013 Q3 1100

  2013 Q3 900

  2013 Q4 1400] (delimiter is ' ');

I added a reference line to Bar Chart based on this expression (I wanted to create an average line): Sum(Amount)/Count(Distinct Quarter)

Now, if total Amount in any Quarter is bellow the average, I want for format its bar with red color.

If ( Amount < Average , RGB(204,102,119),RGB(68,119,170) )

Imagem 4.png

Can you help, please?

Best regards,

Ciro.

0 Replies