4 Replies Latest reply on Jul 18, 2017 9:11 PM by khalida nihal

    Change color of row shelf

    Faryal Ali

      Hi

       

      I want to change the color of data based on the row value. What I get in tableau is that the color of the value changes but the color of column with values does not change. Please see the attached image for description. I have rows as

       

       

      Category Product Drop

      Desktop   P3       abc

                      P4       abc

      Laptop     P1      abc

                      P2      abc


      What I want is

       

      Category Product Drop

      Desktop   P3       abc

                     P4       abc

      Laptop     P1       abc

                     P2       abc

       

      Is it possible in Tableau 7.0 ?

        • 1. Re: Change color of row shelf
          Jonathan Drummey

          Hi Faryal,

           

          As far as I know, there is no way for Tableau to color headers other than through banding. There is a workaround since Tableau will color measures, so one way to do this is to set up multiple axes using a value of 0 (one for each header) and then setting those axes to the Text mark type, with the Text equal to the appropriate dimension and the color being the category. Then we turn off Show Headers for the initial dimensions and just show the fake dimensions instead.

           

          This method has the following drawbacks:

          - Tableau uses the same horizontal size for all axes, so you're stuck with one size for everything.

          - All dimension text is repeated for every instance of that dimension, which clogs up the view.

          - There's no ability to left or right-justify the text, which makes it harder to read.

           

          An alternative to this is to use a highlight table, so instead of just highlighting the measure values you are highlighting the background of the measures.

           

          Jonathan

          • 2. Re: Change color of row shelf
            Faryal Ali

            Hi Jonathan,

             

            Considering the drawbacks you mentioned , can you please give the example of the alternative you suggested? One thing more, will the solution work if I have a hierarchy of category,subcategory, products and so on?

             

            Plus can I use banding while having hierarchy? I have tried to use banding, but it needs to be adjusted for every hierarchy level.

            • 3. Re: Change color of row shelf
              Jonathan Drummey

              Hi Faryal,

               

              See the attached for an example of a highlight table. You can set the color of the background to whatever dimension (or calculated dimension/measure/set) you want, so the calculation to identify the color can be as simple or complicated as necessary.

               

              I'm not that familiar with banding, I do know that it repeats colors as it bands every N rows, so when you want to use banding colors to make more than two distinctions between members of the same dimension, banding won't work.

               

              Jonathan

              • 4. Re: Change color of row shelf
                khalida nihal

                Hi Jonnathan,

                 

                I have a similar issue where i am trying to highlight few rows in my data grid in tableau worksheet. could you pls help me out. I have attached the source sheet,tableau workbook and the report format i am trying to achieve.

                 

                 

                I have tried to highlight the data using the field 'Code'. Here i am trying to highlight the codes with values 5 and 9 which have the header Variation and total respectively. The values against these headers are temporary. I will be creating dummy fields for these headers without values later on.

                 

                Kindly help me out in this. I would really appreciate it. Thank you.