3 Replies Latest reply: May 17, 2010 10:19 AM by Michael Solomovich RSS

    Lock color settings to customers



      I want to always have the same colors for the same customer. How do I go about doing this in Qlikview?

      For example, if I have a stacked bar for sales with 3 customers (A, B, & C) and I want a grey color for A, a green color for B, and a yellow color for C in all charts. If I choose customer A and C in my current file, C switches to the color of B. How do I lock these colors?

      Thanks in advance,


        • Lock color settings to customers

          You can create an expression on the Background Color of the expression.

          Go to your chart properties, go to expressions tab, open up (click on +) the expression and go to Background color. In the definition area, create an expression something like the following:


          IF( Customer='A' , grey(), IF(Customer='B' , green() , IF(Customer='C' , Yellow() , Black() ) ) )

          The Black at the end is the final ELSE.

          Good luck,

          • Lock color settings to customers

            Hi Glennson,

            To achieve this, what you have to do is, in the property window of the charts, in the color tab, you will find a check box called "persistent color". Just check this check box in all the charts you want the same color. Once this is done, then the color remains same in all the charts. Hope this helps you. Check this out.

            Thanks Joseph.......

              • Lock color settings to customers
                Michael Solomovich

                It depends on what you actually want. If you want the color for each customer to be consistent, but don't care what exactly color is assigned for each customer and don't mind that it may change after reload - follow the advice from Joseph.
                If you have a small number of customers, and want a specific color for each - use advice from Nigel West.
                If you have a large number of Customers, and want a specific color for each - you need color information in data source.