Tableau Tip: Conditional Formatting Highlight Cell Rules

I received a question from a student recently about how to apply Excel-like conditional formatting in Tableau. This is a great feature in Microsoft Excel in which you can highlight cell values based on a rule you setup. In Tableau however, this isn’t as straight forward. Here are the simple steps to accomplish this using a simple calculation in Tableau.

  1. Create a new calculated field (right click in data pane > create > calculated field)
  2. Add your logic to the calculated field. Replace [field] with the field you want to compare to and whatever values you want for 0.2 and 0.8. These values are good for percentages but use whatever values make sense for your viz.

    if [field]<0.2 then 'blue' elseif [field]>0.8 then 'blue' else 'black' end
  3. Use this as a color attribute for your viz

In a follow up post we’ll explore how to make these more dynamic using parameters and “top” logic instead of hard-coded values. Stay tuned!

More on my YouTube Channel here:

Experience The Joy of Tableau, See your Data

This Free 5-Day Video Course Contains
  • Tableau Product Family
  • User Interface and Terminology
  • Connecting to Data Sources
  • Drawing Charts
  • Sharing Your Insights