10 Replies Latest reply: Jun 5, 2012 4:49 AM by macsigarev RSS

    Histrogram colors

      Hi Qlikcommunity,


      I am trying to represent a Mysql table as an histogram in qlikview.

      The table has many columns but i am focusing on 3 of them:

      - costs

      - units

      - risk level


      In my qlikview document , I have the 2 dimensions:

      - unit(CODEU)

      - risk level(RISKREVSTAT)


      I am also using a   sum() function on a specific column of the table (for example costs).

      "Risk level" is another column of the same table


      My purpose is to do a stack histogram to represent the costs(sum of the costs) according to the risk level respecting specific color rules:



      To summarize,  i want qlilview to do:

      - the sum by dimension unit of all rows having risk level=low, risk level=medium,.....

      - display the color stacks using specific color rules(low=GREEN, high=RED, medium=YELLOW, empty=GREY)


      I hope i have been clear in my exmplanation, thank you in advance for your help



        • Histrogram colors



          You can write expression for backgroud color in expression tab in which you can specify the color for each value.

          Please post a sample data/QVW file to make your problem more clear.


          Hope this help,


            • Histrogram colors

              Hi Anosh,


              thanks for your reply, please find attached a snashot of my Qlikview report.

              As u can see, the color displayed is not corresponding to the 'risk level' at the right.



                • Re: Histrogram colors



                  Please find the attached screen shot for changing the expressions color from Chart properties. You can checked the  persisent color check box option which locks the color map so that each value has a color permanently assigned to it.


                  Hope this help,

                  Anosh Nathaniel

                    • Re: Histrogram colors

                      thank you a lot Anosh, it resolved my problem.

                      But i heard there is another way to perform that using color functions. Is it right? If yes, how can i implement the same using function?


                      Thank you in advance

                      • Histrogram colors

                        Hi Anosh,


                        I am coming back again just for one more question:

                        How can i order my charts colors as specified below ??:

                                          - LOW (green) at the the bottom

                                          - MEDIUM (yellow) second part of the chart

                                          - HIGH (red) upper part of the chart


                        thank you in advance for your help

                          • Histrogram colors



                            Order your expressions in such a way that green should be first, yellow should be second and red shold be third and then change the color in colors tab accordingly.


                            Hope this help,

                            Anosh Nathaniel

                              • Histrogram colors

                                Hi anosh,


                                The chart is stacked according a dimension called "risklevel" witch has 4 values (low, medium, high, undefined).

                                I mapped 4 colors to these 4 values (grey, green, red, yellow), the system automatically (alphabetically) sorted the values in this order: grey, green, red, yellow.


                                How can i sort the colors according to my needs , so qlikview will display following the rule below:

                                grey, green, yellow and red (the highest risk level!). ??





                                thank you in advance