Tableau Basics: Use Hide Instead of Filters to Keep Trend Calculations

Imagine you want to build a visualization showing trends from year to year for a specific KPI within your company. You create the visualization, adding years to the columns and your KPI to the rows. You then right click on your KPI and use Tableau table calculations to determine the year over year change. The chart shows everything exactly as you want it, except the first year is blank. This makes sense, because the first year has nothing to compare to previously, but do you really want to show an empty year in your chart?

The most intuitive way to solve this problem is to filter out the offending year, but you’ll find that when you try that, it doesn’t work. Tableau removed the blank year, but now the following year is blank. You want a way to remove the leading blank year from your visualization to avoid confusion from your customers. What can you do?

Tableau has a feature, known as Hide, that can easily be missed if you don’t know where to look for it. This feature removes a portion of your visualization without removing it from calculations. This allows you to hide dimension values such as your leading year without causing the next year to go blank. It is also extremely simple to apply:

  1. Right click on the header value in your visualization that you wish to hide (such as the first year in our example, similar to the figure). ...

Get Tableau Basics: Use Hide Instead of Filters to Keep Trend Calculations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.