fbpx

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: www.youtube.com/BenSullinsDataGeekChannel

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.