Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
0li5a3a
Creator III
Creator 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

 

Labels (3)
1 Reply
NW1965
Creator
Creator

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.