4 Replies Latest reply on Oct 25, 2016 6:28 AM by Jhon Quishpe

    How can I apply custom colors to my header values?

    Leigh Fonseca

      I would like to add custom colors to header values and am having some difficulty.  I loved the What's in a Baby Name?

      (http://www.tableausoftware.com/learning/examples/baby-names) vis as an example of applying color to the value plane.  For a project I'm working on, I need to apply color to the header values rather than the measure values as displayed below.  I understand how to apply a single color to the headers but not how to apply a specific color for each header value.  Any ideas how to do this?

       

      color example.png

      I altered the Baby Names workbook and attached it.

       

      Thanks,
      Leigh

        • 1. Re: How can I apply custom colors to my header values?
          Jeff Rice

          Tableau can accomplish this using multiple measures and Mark Types to create a view similar to the one below. 

          pic 1.jpg

           

          We can do this by:

           

          1) Make a “dummy” Calculated Field for the your Header Value equal to 1.  (In this example I used Sub-Category)

          pic 2.jpg

          2) Do the same thing for any Measure Values you want in your view.  (for this example I brought in Sales, Profit, and Profit Margin)

          pic 3.jpg

          3) Start by making a view similar to the one below, with your Header on the Rows and it’s ‘dummy’ measure value on the Columns set to Minimum.  Right click on your Header and de-select Show Header.

          pic 4.png

          4) Put your Header (sub-category) on the Label shelf (keep it on the Rows shelf at the same time) You will need to Edit Axis to a fixed 0-1.  You may also want to remove Tick Marks and adjust the Title.

          pic 5.jpg

           

           

          5) Put whatever measure or dimension you like on the Color shelf. (I have a KPI on this example)  Move the Size slider up all the way.  You may want to put a Border around the Color and Format the Label to be Bold/Larger font etc.

          pic 6.png

          6) Bring in one of the ‘dummy’ measure values you created earlier and put it on the Columns shelf.  Set it to Minimum.  On your Marks card, select Multiple Mark Types. Toggle between the different mark types to see that you can now make different mark types for your first ‘header’ value and your second measure value. 

          pic 7.png

          7) Set the second mark type (Sales) to Text and remove anything from the color shelf.  Put the real measure value (not the ‘dummy’) on the Text shelf.  You may also want to remove Tick Marks and edit the Axis Title. 

          pic 8.png

          8) Repeat this with any other measure values you want in your view. 

          • 3. Re: How can I apply custom colors to my header values?
            Leigh Fonseca

            Thanks, Jeff!  This is great and really helpful.  Very much appreciated

            • 4. Re: How can I apply custom colors to my header values?
              Jhon Quishpe

              Hello Jeff, I need to achieve this solution, I'm trying to follow your instruction but print screen picture are missing, please could you help me.

               

              thanks for your help

               

              Rgs

              Jhon