Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Specific color for each measure?

Hello. I have a two-measure bar chart and I need to apply a specific color to each measure. I was hoping to accomplish this using "Color By Expression", and yes I have read all of the Sense documentation on the subject.

However, all of those examples are using expressions based on values. Which makes sense. Under most conditions I think this would be the most common use case. However, I want to apply my specific color to each measure, always, regardless of values.

I can set a custom color for all measures, but not specific colors for each measure.

Any help would be appreciated.

Thanks,

Jared

3 Replies
Not applicable
Author

Try using if condition in the color by expression.

if(measure=measure1,rgb(127,255,127),if(measure=measure2,rgb(255,127,127)))

Something like this. It should work.

Not applicable
Author

I tried this, and it says that measure is invalid.

I've seen other people say this works, so I suspect maybe this works in Qlikview but not in Sense.

ian_wilson
Former Employee
Former Employee