8 Replies Latest reply: Mar 3, 2017 5:14 PM by Garrett Bangsboll RSS

    Color expression for stacked bar chart (expression measures) - Qlik Sense Desktop

    Garrett Bangsboll

      Hi Qlik Community!


      Fairly new Qlik Sense user and first time posting in the community.


      I have a stacked bar graph with a single Dimension.  There are three measures of the expression form: count({<[Claim Priority]={'High'}>} [Claim Priority])    (other two just have "High" changed to "Medium" and "Low", respectively).


      Essentially, for each Dimension I have the full count of the field "Claim Priority" stacked into their High, Medium, and Low counts.  I would like the colors of each of these to be red, yellow, green, respectively.


      Using the multicolored selection for Appearance->Colors does get the graph into the three distinct colors but not the colors I am hoping for. Current state of the graph can be seen here:



      I think using Colors By Expression is what I need to do, but the following expression leads to the below graph:


      if(([Claim Priority]='High'),red(),(if(([Claim Priority]='Medium'),yellow(),green())))




      Could you please help me out with this?  Some digging around has indicated I may need to include a step in the data load script but if I can just adjust the color expression that would be the preferred route.