Conditional Formatting in Tableau – I

I guess most of us know about conditional formatting in excel. For those, who are new to excel, I am giving a brief intro of Conditional formatting in excel.

Conditional Formatting (CF) is a tool that allows us to apply formats to a cell or range of cells, and have that formatting change depending on the value of the cell or the value of a formula. For example – we want to format the cell Green when value is >0 and Red when value <0 and White when it is 0. We can set the rule to do this in excel. (Please refer Microsoft Support Site for doing this).

Here we will discuss, how to do Conditional Formatting in Tableau. For explaining this I am considering Sample Superstore data set. There are two ways in which we can do formatting:

  1. Formatting the background (Changing color of cell)
  2. Formatting the Foreground (Changing color of text)

In this posts, I will discuss first one, just follow below instructions one by one:

  1. Create the tabular view of data that you want, for example – I want to show Sales from each Sub category, Region wise:


  1. Change the format of table from text table to highlight table by selecting the highlight table option:


  1. Create a calculated field for color condition:


  1. Drag calculated field to color shelf:


  1. Edit colors to give appropriate color of your choice:


  1. Change mark type from Square to Bar:


  1. Create a calculated field One:


  1. Drag One to size shelf and increase the size to its maximum value:


We have got our desired Formatting.

To achieve second type of formatting, here is the link.

Hope you have liked this post.

Leave a Reply

Your email address will not be published. Required fields are marked *