Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: Specific color for each measure?

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

Re: Specific color for each measure?

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.

Employee
Employee

Re: Specific color for each measure?