In QlikView, when using a stacked bar chart and using multiple expressions for each segment/stack you could control the individual color of the segment/stack.
It looks like you might be able to do the same in QlikSense but it would have to be done via one formula for all charts. What is the proper formula we should be using in this one formula field to control the colors for each individual segment/stack that would be the most efficient with large data sets?
Additionally, when selecting the color by expression option the show legend option disables.
How would I make a stacked bar chart with 3 expressions (1) Good, (2) Marginal, (3) Bad for example so that Good would be in Green, Marginal in Yellow and Bad in Red and have a legend indicating that.
Please note the expressions and colors indicate are purely for discussion and problem clarification. We do understand colors and color blindness impact.
Have you tried to add a Gauge and go to Appearance, then Presentation and check the Use Segments?
Here you can select the segments and the color associated to it
I don't believe a Gauge will work. As I mentioned we need a bar chart. We have to be able to display dimension(s) with several thousand values.
You can colour a stacked bar chart in the following way. Take this as an Example.
Use these expressions:
Dimension 1: year-month
Dimension 2: valuelist( 'achieved', 'justmissed' and 'missed')
Measure : if(valuelist( 'achieved', 'justmissed' and 'missed') = 'achived',<expression1>,
if(valuelist( 'achieved', 'justmissed' and 'missed') = 'justmissed',<expression2>,
if(valuelist( 'achieved', 'justmissed' and 'missed') = 'missed',<expression3> )))
if(valuelist( 'achieved', 'justmissed' and 'missed') = 'achived',lightgreen(),
if(valuelist( 'achieved', 'justmissed' and 'missed') = 'justmissed',yellow(),
if(valuelist( 'achieved', 'justmissed' and 'missed') = 'missed',lightred() )))
Check this for a QVF sample.