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: 
ashokpaladugula
Contributor III
Contributor III

Color based on measure

Hi All,

I'm creating bar chart for margin for the customer.

So i need based on margin value(measure) bar color need to be change.

For instance,

Measure.png

Thanks,

ASHOK

6 Replies
marjan_it
Creator III
Creator III

what color do you want to have?!

if you want color like your image you can use in expression in backgroundcolor, add color mix like image.

if you want to have some diffrent color you can add expression in background color.

what do you want exactly?!

ashokpaladugula
Contributor III
Contributor III
Author

Hi,

I want color based on measure.

For instance,

as per my image

1. Robert Bosch has 8.13 M magin

2. IAC has 5.09 M margin and

3. Avon Automotive has 3.85 M margin.

If we observe the margin value( measure) is decreased( descending order).

So Robert bar has thick blue color

IAC has light blue color and Avon has pale blue color.

So i need based on measure color should be vary.

Thanks,

ASHOK

Anonymous
Not applicable

Hi Ashok,

refer the below link, it may help you.

Changing the Colour of the bars on a barchart according to there value?

Regards,

Murali Mohan.T

marjan_it
Creator III
Creator III

YOU SHOUL USE COLOR MX LIKE THE SAMPLE

sravanthialuval
Creator
Creator

You have to write below condition under Properties->Expressions->Margin->background color.

if(Margin<5000000,RGB(83,83,255),if(Margin>=5000000 and Margin<6000000,RGB(9,9,255),RGB(0,0,121))

ashokpaladugula
Contributor III
Contributor III
Author

HI Sravanthi,

But my problem is, If you have the limited measurable values is's fine. but there are more measures(values). So we need to write color code for every measure.

Thanks,

ASHOK