Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Conditionally colouring Bars in a Chart/Reference Lines

Hello.

I have a bar chart detailing sales for my companies.

I want to display a reference line with the mean of the sales for that company. (Avg(Amount)). I also want to display 2 more lines showing +/- vThreshold%. So far I think I have implemented these.

I now I want to colour the bars on the chart which do not fit within the specified threshold. So if the average is 50 and the theshold is 10%, a value of 60 or 40 will be red, and blue otherwise

It makes much more sense in the attached file. Im sure theres some set thing im missing in my Background Color expression. Help!

1 Solution

Accepted Solutions
whiteline
Honored Contributor II

Re: Conditionally colouring Bars in a Chart/Reference Lines

I think, you've forgotten about total qualifier:

=if((Amount < avg(total Amount)      *(100-vThreshold)/100)    ,LightRed())

2 Replies
whiteline
Honored Contributor II

Re: Conditionally colouring Bars in a Chart/Reference Lines

I think, you've forgotten about total qualifier:

=if((Amount < avg(total Amount)      *(100-vThreshold)/100)    ,LightRed())

Not applicable

Re: Conditionally colouring Bars in a Chart/Reference Lines

Try this.

Community Browser