KNOWLEDGE BASE

Applying Color to a Single Column in a Crosstab View


Published: 04 Apr 2014
Last Modified Date: 07 Apr 2017

Question

How to apply color to a single column in a crosstab view.

Environment

Tableau Desktop

Answer

Use one of the following workarounds.

Option 1

  1. In Tableau Desktop, connect to Orders (Sample Superstore).
  2. Drag Segment to Columns.
  3. Drag Region and Order Date to Rows.
  4. Drag Sales to Text.
  5. Drag Segment to Color.
  6. Edit the colors in order to show only two colors (in this example, blue and grey).
    1. To edit colors, open the color legend drop-down menu, and then select Edit Color. For more information, see Color in Tableau Help.

Option 2

  1. Reproduce the above steps and Duplicate the sheet.
  2. Remove Segment from Colors.
  3. Select Analysis > Create Calculated Field.
  4. In the Calculated Field dialog box that opens, do the following and then click OK:
    • Name the calculated field. In the example workbook, the calculated field is named Consumer Highlighted.
    • In the formula field, create a calculated field similar to the following:
      IF [Segment] = "Consumer" THEN "color"  
      ELSE "no color"
      END
  5. Drag Consumer Highlighted to Color.
  6. Similar to Option 1, edit the colors in order to show only two colors (in this example, blue and grey).
    1. To edit colors, open the color legend drop-down menu, and then select Edit Color. For more information, see Color in Tableau Help.

Option 3

  1. In Tableau Desktop, connect to Orders (Sample Superstore).
  2. Drag Sub-Category to Rows.
  3. Drag Profit and Sales to the view.
  4. Drag Measure Names to Colors.
  5. Edit the colors in order to show only two colors (in this example, blue and grey).
    1. To edit colors, open the color legend drop-down menu, and then select Edit Color. For more information, see Color in Tableau Help.

Additional Information

To view these steps in action, see the video below: 
Did this article resolve the issue?