Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
melissapluke
Partner
Partner

Color by expression/measure

Screen Shot 2017-02-09 at 12.21.16 PM.png

Hi all.  I have read some of the other color by expression/measure posts, but still can't seem to figure this out, so I was hoping someone could help me.

I have a bar graph that breaks down by Financial Division (and there are a few alternative dimensions as well).

There are 5 measures I am using to get the stacked bars which sum a dollar amount:

- $(vSum120)

- $(vSum90)

-$(vSum60)

-$(vSum30)

-$(vSum0).

I am not able to add any additional dimensions to the graph.  I would like to be able to add custom colors to each of the measures and I can't figure out how to do so in the Color expressions field. 

For the sake of the example, lets say these are the 5 colors I would like to use red(),lightgreen(),green(),lightblue(),blue().

Any help would be appreciated. Thanks!

1 Solution

Accepted Solutions
gareth_wilson12
Partner
Partner

Apologies, makes things a little more difficult but possible.

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

View solution in original post

7 Replies
gareth_wilson12
Partner
Partner

You can use the expressions background colour

Here it uses RGB to define the colour but you can also just use red () green () etc

ColorIfThen.png

melissapluke
Partner
Partner
Author

This is in Qlik Sense, not QlikView.

gareth_wilson12
Partner
Partner

Apologies, makes things a little more difficult but possible.

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

View solution in original post

melissapluke
Partner
Partner
Author

No problem.  I actually saw that post, but I am unable to make an additional dimension and therefore can't go down that route.

Carlos_Reyes
Partner
Partner

You do have to follow the approach suggested by gareth . Although it has a limitation, you cannot use multiple measures using that route. You have to concentrate all your measures into one and use a nested if  ( as in the post ) or a combination of pick and match (as in the enclosed file) functions to make it work.

Review the enclosed file.

Anil_Babu_Samineni

Even it QlikSense, Why can't this expression. You may go with below attachment{There, you need to sort ByExpression} and then write expression as he suggested

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Carlos_Reyes
Partner
Partner

Qlik Sense 3.2 just came out today! and now you can define a specific color for a measure if you define it as a master item. Either, the previous response, or this new feature should resolve your needs. Review the enclosed