How to Make a Tableau Navigation that Doubles as a Color Legend

  • Advanced
  • User Experience

Receive Weekly Tips

Follow us on LinkedIn!

Okay – I thought I was done with the Tableau user interface tips series, but I’ve got a bonus tip for you. As is often the case, new client requirements inspire new approaches that are made possible through Tableau’s flexibility. While I was writing the five posts in the UI series, a need came up to create a navigation that doubles as a color legend. You can set up color legends to highlight dimension members, but this navigation needed to filter. A filter alone wouldn’t work because filters don’t include color encoding.

So let’s combine the two using a highlight table and dashboard actions! This approach provides several benefits including (1) formatting flexibility (2) improved dashboard processing time and (3) a better user experience.

If you are familiar with this technique, you likely know that the Square mark type can limit your ability to make nice, evenly-sized squares that fill all the available space in each cell of the highlight table. This tutorial shows you a trick for getting around that too – producing perfect rectangles every time!


How to Make a Navigation + Color Legend with a Tableau Highlight Table

To illustrate how to combine a navigation and color legend using a highlight table with dashboard actions, we will recreate this small dashboard. This dashboard uses a Tableau dual-axis waterfall chart to show how profit is trending in the Sample – Superstore dataset.

Tableau Highlight Table Navigation Unfiltered

Clicking on the highlight table at the top filters the chart.

Tableau Highlight Table Navigation Filtered to South Region

The navigation at the top is created by setting up a control sheet that includes the dimension members you want to include in the navigation. To set up the view, start by creating a new worksheet, placing the dimension of interest on the Columns Shelf, changing the mark type to Square, and placing the dimension of interest on the Color Marks Card as well as the Label Marks Card.

Starting a Navigation Control Sheet in Tableau

This is a good start, but obviously we need to make the squares larger; ideally filling all of the white space between each button. Here’s where most run into some formatting issues. Here’s how the view looks after clicking on the Size Marks Card to increase the size of the square marks and dragging the slider all the way to the right (making the marks as large as possible).

Tableau Highlight Table with Large Size Square Marks

Yikes – not very effective! The orange square that represents the Central region is laying on top of the others so we do not see as much of the red and blue squares; or any of the turquoise square. Luckily, there is a simple solution: Drag the dimension of interest to the Columns Shelf a second time.

Tableau Highlight Table with Evenly Sized Squares

There are a few more things I like to do to a view like this before adding it to a dashboard:

– Hide the headers by right-clicking on them and deselecting “Show Header”.
– Format the column and row separators for the table by right-clicking anywhere on the table and choosing “Format…”
– Ensure the labels are always a consistent color by clicking on the Label Marks Card and changing the font format

Tableau Highlight Table Navigation with Formatting

The color legend / navigation is now ready to be added to a dashboard. The user experience of having the dashboard filter to the dimension member clicked from the table is accomplished through dashboard actions. Simply add a dashboard action that suits your needs; here is a look at the dashboard action for the use case illustrated in this post.

Tableau Navigation Color Legend Filter Dashboard Action

Thanks for reading,
– Ryan

Level Up with Playfair+


Learn More

Related Content