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:
- Formatting the background (Changing color of cell)
- Formatting the Foreground (Changing color of text)
In this posts, I will discuss first one, just follow below instructions one by one:
- Create the tabular view of data that you want, for example – I want to show Sales from each Sub category, Region wise:
- Change the format of table from text table to highlight table by selecting the highlight table option:
- Create a calculated field for color condition:
- Drag calculated field to color shelf:
- Edit colors to give appropriate color of your choice:
- Change mark type from Square to Bar:
- Create a calculated field One:
- 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.