We’re starting a blog series dedicated to helping you improve the performance of Tableau in your environment. It all starts with the Best Practice Analyzer from Workbook Tools for Tableau. This feature lets you know exactly how you can improve your Tableau workbooks to run faster and smoother.
Each post in the series is related to specific performance issues that are flagged by the Best Practice Analyzer. If you don’t have it yet, get it. You can also check out more guidelines found on our Tableau Performance Checklist.
Creating Filters
Filters that you create in Tableau are calculated independently by design. This means that each filter accesses all rows in your data without concern to other filters created in the same view. However, you can create a dimensional context filter that will cause all other filters to be dependent because they now must process the data that has passed through the context filter. Herein lies the issue with context filters and why your view was flagged.
The Issue with Context Filters
When you set a dimension to context, Tableau creates a temporary table that will require a reload each time the view is initiated. For Excel, Access and text data sources, the temporary table created is in an Access table format. For SQL Server, MySQL and Oracle data sources, you must have permission to create a temporary table on your server. For multidimensional data sources, or cubes, temporary tables are not created, and context filters only define which filters are independent and dependent.
How to Improve Performance while Using Context Filters
If you see performance degradation while using context filters, there are some general guidelines to help improve performance:
- Using a single context filter that significantly reduces the size of the data set is better than applying multiple context filters. A context filter should, at a minimum, reduce the size of the dataset by 1/10 or more. Not reaching this could cause performance to be worse as the performance cost to compute the context temporary table is not valuable.
- All data modeling should be complete. Changes in the data model, such as switching dimensions to measures, will require re-computing the context.
- You have the ability to set a continuous date field to context, yet using discrete binned dates will most likely be more effective.
Curious about other Tableau workbook performance best practices? We have a growing list of posts to help you out. Here are the topics we’ve covered so far:
- Custom SQL Connections
- Automatic Dashboard Sizing
- Limit Calculated Field Length
- Reduce Number of Dashboard Worksheets
- Conditional Filter Logic
- Images & Shapes
- Word Clouds
- Mixed Data Connections
- Quick Filter Cardinality
- Relevant Value Filters
- Row-Level Parameters
- Table Calculation in Level of Detail
- Teradata Initial SQL
- Unused Data Sources
- Blending Calculations
- Unused Columns