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:

conditional-formatting-in-tableau-1

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

conditional-formatting-in-tableau-2

  1. Create a calculated field for color condition:

conditional-formatting-in-tableau-3

  1. Drag calculated field to color shelf:

conditional-formatting-in-tableau-4

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

conditional-formatting-in-tableau-5

  1. Change mark type from Square to Bar:

conditional-formatting-in-tableau-6

  1. Create a calculated field One:

conditional-formatting-in-tableau-7

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

conditional-formatting-in-tableau-8

We have got our desired Formatting.

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

Hope you have liked this post.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz