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:
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...
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?
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.