Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Custom color by expression for two different expressions

I have a stacked bar-chart, with one dimension and two expressions.

Both expressions have a different meaning, but should be stacked to indicate a total.

By choosing color "Auto" or "Custom - Multicolored" I get the following visualization:

20150617 - CustomColorByExpression.PNG

Almost perfect... Just not these default colors blue and purple-red-ish.

In the rest of my dashboard I use two custom colors for the meaning of these expressions, which I want to apply to this bar-chart.

Choosing color "Custom - By expression" allows me to create an expression to color. But I cannot seem to make a color-expression that results in a different color for the first and second expression. The single color-expressions seems to be applied on both expressions equally and I don't know if (and how) I can actually make an "IF"-statement to address them separately...

20150617 - CustomColorByExpression2.PNG

One of the attempts include an IF statement that checks for a dimension-value particular for one of the expressions.

Another attempt includes checking COLUMN(1), also didn't get that to work.

How can I use the custom color expression to set different colors for expressions?

14 Replies
Highlighted
Creator
Creator

Thanks for pointing to that other thread. Helpful!
Although it achieves the result, it's far from ideal when trying to use a consistent color for a certain country throughout the dashboard.

Highlighted
Partner
Partner

Gysbert,

What solution would you suggest for Combo Chart (not a Bar Chart) case?

As far as I know CC are not allowing multiple dimensions (I am using QS 2.1.1)....

Regards,

Vladimir

Highlighted
MVP & Luminary
MVP & Luminary

Can you explain what you want to do in a combo chart with regard to colors? Preferably in a new discussion.


talk is cheap, supply exceeds demand
Highlighted
Partner
Partner

I need to set different (non-standard or "suggested" by Qlik) colors for my measures...

I have 4: 2 Bars and 2 lines.

I've created a post trying to understand if I can use the same approach as above in Combo charts.. (Unable to add second dimension to a Combo chart)

Regards,

VK

Highlighted
Contributor II
Contributor II

One way to achieve this is by creating a Master Item Measure for both of your measures. In creation of this measure you are able to select the color of your choice for each respective measure and these colors will stay consistent throughout your app if you have them displayed in multiple sheets.