Keeping Your Tableau Dashboard Clean and Easy to Maintain
As much as possible, I want all my dashboards to be easy to understand and maintain--not only for my future self, but also for anyone else who might have to work on them. If a workbook is full of unused fields, unused worksheets, and complicated calculated fields with no comments to explain what's going on, then you'll waste time struggling to figure things out before you can make a simple change or fix something that's broken.
Here are my current practices for keeping Tableau workbooks clean and organized:
Hide Fields You're Not Using
Hiding unnecessary fields will reduce clutter and help speed up Tableau processing. Right-click each unused field and select Hide
.
If you ever need to see the hidden fields again:
- From the "Data" pane, next to the search box, select the drop-down arrow and choose
Show Hidden Fields
. - Alternatively, from the "Data Source" page, select the gear icon and choose
Show Hidden Fields
.
Pre-filter Your Data
If your stakeholders are only interested in data from the last twelve months, there's no need to pull in everything from the last five years. Working with more data than you need will make Tableau work harder and possibly lag.
To filter your data at the source:
- From the "Data Source" page, under "Filters", select
Add
. - Select
Add
, and then choose a field to filter (for example,Order Date
). - Follow the prompts to set your filter conditions. For example, select
Range of Dates
and use the slider to choose what range of dates you want to work with. - Select
OK
.
Create Hierarchies
Creating hierarchies not only keeps related fields nested together, it also lets you drill down to different levels of detail. For example, if you're using the Superstore data, you could create a hierarchy for geographic data:
- In the "Data" pane, right-click
Country/Region
and selectHierarchy > Create Hierarchy
. - Give it a name like "Location" and select
OK
. - Drag the
State
,City
, andPostal Code
fields to the "Location" hierarchy. Make sure they're listed in that order below "Country/Region".
For more about hierarchies, see Create Hierarchies.
Create Folders
If you're dealing with lots of data fields, it may make sense to keep everything organized by creating folders:
- In the "Data" pane, next to the search box, select the drop-down arrow and choose
Group By Folder
. - To create a folder, in the "Data" pane, right-click a field and select
Folders > Create Folder
. Enter a name for the folder and selectOK
. - To add a field to an existing folder, either drag the field to the folder, or right-click the field and select
Folders > Add to Folder > [The folder you want]
.
For more about folders, see Organize and Customize Fields in the Data Pane.
Add Comments to Your Calculated Fields
It's a good idea to add comments that explain what your calculated field is doing, especially if it's not obvious at a glance. You can use two forward slashes (//
) for single-line comments or /*
and */
for multi-line comments. Examples:
// This is a single-line comment
/* This is a longer comment that
spans multiple lines */
Use Data Extracts
Most of the time you'll want to set up your dashboard to use a data extract rather than a live connection to an online database. A data extract is a saved snapshot of the original data. Depending on the size of the dataset, it can take Tableau a long time to create a data extract; however, once it's created, it should improve Tableau's performance. You'll also be able to work on the dashboard offline, so you won't have to enter your credentials every time you want to open the workbook and try something.
To create a data extract, on the "Data Source" page, select Extract
.
To learn more, see Extract Your Data.
Use the Optimizer Tool
As a final check before publishing your dashboard, you can use Tableau's Optimizer tool to help find issues that should be cleaned up. The nice part is that Tableau can automatically clean up many of the issues it flags for review, such as hiding unused fields.
To learn more, see Workbook Optimizer.