8 Replies Latest reply: Dec 15, 2015 4:36 AM by Sangram Reddy RSS

    Stack colors in Bar chart for Qlik sense?

    Satish Pawar

      Here i'm working in Qlik sense.

       

      i have attached sample data QVF.

       

       

      1)How we can give desired colors for stacks inside bar in Qlik sense if i used calculated Dimension.

       

      2) here when i click on Cold Chain filter e.g DEPOT.

          It should Visualize only DEPOT in first chart but it shows ST and DEPOT also.

          even my set analysis and condition in Dimension are correct.

       

      Is this problem of Qlik sense or my Condition?

       

       

       

       

       

       

       

       

       

       

       

      COMMUNITY.PNG

        • Re: Stack colors in Bar chart for Qlik sense?
          Andy Weir

          for 2 its your condition

           

          On % Compliance Measure

           

          Count({$<param_name={'Temperature'},branch_type=>}param_value)/

          count(total(if(param_name='Temperature' and (param_value)<='-1','Blue')))

           

          Remove ,Branch_type= and it will work.

            • Re: Stack colors in Bar chart for Qlik sense?
              Satish Pawar

              In 1st and 2nd chart i have calculated percentage.

               

              But how can i assigned stack colors into Bars for a percentage of following groups 

               

              above -10-->Blue()                                                          

              -10.1 to -13.9-->red()

              -14 to -17.9 -->yellow(),

              -18 & below-->green()



              i'm trying to show the percentage for above groups into the BAR in these colors.

               

              above -10
              -10.1 to -13.9
              -14 to -17.9
              -18 & below

               

               

              Existing colors in chart are given by Qlik sense itself.

            • Re: Stack colors in Bar chart for Qlik sense?
              Demian Rebollo

              Satish,

               

              Please see here my reply about this.
              Re: How to use custom colours in a stacked bar chart

              I learned that in Qlik Sense it is not possible yet to change the colours in a stacked bar with simple IF statements.

               

              Hope this helps.

              Cheers!

              • Re: Stack colors in Bar chart for Qlik sense?
                Sangram Reddy

                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> )))

                 

                Colour Expression:

                               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.

                How to use custom colours in a stacked bar chart