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: 
Anonymous
Not applicable

Chart colour based on values

Hello

I am creating a bar graph and I am looking to change the colours if they certain bar reach a certain level

Its split into 2 groups

A,B -  Blue

C,D - Red

But I want to make it so that if A or B reach 5 they change colour

same with the rest

i.e.

IF (A => 5 rgb (50,50,100), rgb(0,0,100))

If A reaches 5 or more change colour otherwise stick with being blue

Then same with the rest

If you could help it would be appreciated

Thank you

3 Replies
sunny_talwar

Its split into 2 groups

A,B -  Blue

C,D - Red

How are you splitting this? do you have one or two dimensions? What is your expression?

rittermd
Master
Master

Go to Appearance/Colors

Turn off Auto Color and then choose By Expression

Enter your expression something like this but using your fields, values, and colors.  You can replace the Green(), Red() with actual RGB values for more specific colors.

If (Count(distinct {<CurrentActive={1}>} [Employee_ID])/Count(distinct [Employee_ID])=1,Green(),Red())

Anonymous
Not applicable
Author

Hello

Ive just separated them by a value then coloured them

if([Field] = 'A', rgb(0,0,100),

if([Field] = 'B', rgb(0,0,100),

if([Field] = 'C', rgb(100,0,0),

if([Field] = 'D', rgb(100,0,0),

))))

hope that clears it up

Thank you