Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
constantin_olar
Contributor III

hardcode the colours in a bar chart.

Hello,

Can someone help me to solve my change?

Please find the qlik app and the source data attached.

I need to find a way to display all the AMs in a bar chart based on the target.

There are some conditions like:

if the AM value is less than Min Target to be REG, IF the AM value is equal with Medium Target or less than Top Target to be Yellow  and IF the AM value is above Top Target to change the bar to Green.

I need something similar this in the below capture.

Thanks in advance!Capture.PNG

C

 

1 Reply
NW1965
New Contributor III

Re: hardcode the colours in a bar chart.

Hi, I am just going to provide some advice as my company does not allow me to download any samples from the qlik community, hence, I cannot answer with specifics.

In your bar chart, you go to the expression tab and open up (click on the + to the left) the expression that you want to change the colour for.  Go to the background colour option and then create an expression there to define your colours, something like:

IF(AMValue < MinTarget , RED() , IF(AmValue = MinTarget , YELLOW() , GREEN() ))

Notes:

AMValue - Replace this with your expression for AMValue

MinTarget - Replace this with your expression for MinTarget

RED(), YELLOW(), GREEN() - you can replace these with specific RGB values using RGB(n,n,n) to give a very precise colour.