Using Context Filters to Improve Performance

RELATED ARTICLES

Product(s):  Tableau Desktop
Version(s):  All
Last Modified Date:  18 Jan 2012
If you are applying filters to a large data source, you can improve performance by setting up context filters. A context filter is applied to the data source first, and then the other filters are applied only to the resulting records. This sequence avoids applying each filter to each record in the data source.

The view below is of an MS SQL Server database containing airline information for every flight in the United States. As you can imagine, this is a very large data set. The view shows the average delays by destination and carrier. In this example, you are interested only in flights originating from Seattle in September, October, and November 2005. Filters for Origin City, Destination City, and Flight Date are in place on the Filters shelf.

User-added image

With this approach, Tableau has to look through every record in the database twice to apply these filters. To speed up the process, you can add the Origin City filter to the context.

Create context filters

On the Filters shelf, right-click Origin City and select Add to Context.

context_filters3.png

The filter changes color and is marked with the context filter icon.

Now the Flight Date filter is applied only to the records of flights that originated from Seattle. Any other filters you add are also applied only to the records that pass the context filter.

Note: You can also improve performance using Tableau data extracts.

Alternate Search Terms: How To Filters
Need more help? Contact Support


ATTACHMENTS





Search Knowledge Base