Context Filter in Tableau

This link provides an article on sing “Add to Context” filter type in Tableau.

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.

Context Filter

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.

 

Print Friendly

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *