Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

reivax31
Contributor III

Set color to a Measure

Hi Qlik Community,

I'm trying to find a way to set a color to my measures. I know how to set a color to a dimension, but here I'm working on a barchart that has several measures and the colors are automaticaly set by Qlik Sense.

Lets say I have a dimension (x-axis) that is weeks. Then I add several measures (y-axis) like:

Sum(if([week import]<=[WEEK NOUVEL IMPORT],RtD))

Sum(RtD)

Sum(if([week import]>[WEEK NOUVEL IMPORT],[RTD FC (BOTTOM-UP)]))

How can I tell Qlik Sense to give a specific color to my 3 measures?

Best regards.

Xavier

Tags (1)
1 Solution

Accepted Solutions
reivax31
Contributor III

Re: Set color to a Measure

Hi Rod,

Yes it's possible to add several measures to a bar chart if you are using only 1 dimension. I found a way to set color for a measure directly on the Qlik Community. No very easy to use but it works. (doesn't work for combochart)

Qlik Sense: How to set custom colors by measure in a bar chart

Enjoy!

Xavier

9 Replies
informnes
New Contributor II

Re: Set color to a Measure

Same question, different custom colors by measure

rsw
Contributor II

Re: Set color to a Measure

Hi Xavier,

I'm somewhat confused as I don't believe you can have more than one measure in a bar chart. You can have more than one in a line or combo chart however so perhaps that is what you mean?

If I understand your question correctly then, you want to assign each measure a specific color in a chart that supports multiple measures, such as a line chart. At the moment I don't believe this can be done.

Regards,

Rod

reivax31
Contributor III

Re: Set color to a Measure

Hi Rod,

Yes it's possible to add several measures to a bar chart if you are using only 1 dimension. I found a way to set color for a measure directly on the Qlik Community. No very easy to use but it works. (doesn't work for combochart)

Qlik Sense: How to set custom colors by measure in a bar chart

Enjoy!

Xavier

rsw
Contributor II

Re: Set color to a Measure

Hi Xavier,

My apologies, I was confused as to what you were asking, you can indeed have many measures on a bar chart and the solution you have linked to is one I am aware of. Not sure what I was thinking now but glad you got it worked out.

Cheers,

Rod

brunobertels
Valued Contributor

Re: Set color to a Measure

Hi Xavier

You approach with value list to set colors to your mesures is a very good approach : i need to test it.

You may also find very interesting to use the new variable interface and take advantage of it, to set your colors in your chart

Qlik Sense - Variables Interface (video)

Hope it helps

Bruno

Not applicable

Re: Set color to a Measure

I would also like an answer to this question.

reivax31
Contributor III

Re: Set color to a Measure

Hi Bruno,

How can the new variable option help to define color for measure?

Best regards.

Xavier

brunobertels
Valued Contributor

Re: Set color to a Measure

Hi

Have a look to this link

https://community.qlik.com/docs/DOC-9257

You will also get an example app to download to see how it works.

for each mesure add a variable with you mesure and using colormix function

name your variable as vColorMesure1 and so on

So when using the mesure add the named of the variable in the color mesure panel

how ever, you can upload your app , so that the community could have a look and help you to achieve your need.

Bruno

reivax31
Contributor III

Re: Set color to a Measure

Hi Bruno,

I took a look at your link and I tried a few things. But I didn't manage to do what I'm trying to achieve. Still this will be helpfull for other topics I'm dealing with.

I attached an app, that has one chart. It's a combo charts with 3 measures. The colors are set by the system, how can I put the colors I need using variable or other method?

Thanks for your support.

Xavier