Code360 powered by Coding Ninjas X Code360 powered by Coding Ninjas X
Table of contents
Introduction to Tableau
Features of Tableau 
What is Context Filter in Tableau?
Types of Filters in Tableau
Features of Context Filter
Implementation of Context Filter
Creating a Context Filter
Removing a Context Filter
Frequently Asked Questions
What are the Measures and Dimensions in Tableau?
What is a Data Engine in Tableau?
What is Data Joining and Data blending in Tableau?
What are Shelves and Sets in Tableau?
What is VIZQL in Tableau?
Last Updated: Mar 27, 2024

Introduction to Context Filter

Author Nitika
0 upvote


In today's world, large corporations and industries trust tools like Tableau and PowerBI to visualise, analyse and perform operations like Filters. One of these filters is the Context Filter. 

A Context Filter is an independent filter which makes a temporary dataset from the original one to compute the worksheet selections. It helps to apply relevant presets for compilation and is applied first even if other filters are already applied.

Introduction to Context Filter

In this article, we will explore the depths of a specific filter in Tableau called the Content Filter. An introduction to context filters will give us insight into their features and implementation in Tableau.

Introduction to Tableau

Used by people from technical and non-technical backgrounds as well, Tableau is one of the fastest-growing Business Intelligence tools in the industry. With the help of this application, users can operate, analyse and visualise data in the form of charts, maps, graphs and dashboards, even stories as well.

Tableau product suite includes Tableau Desktop, Tableau Public, Tableau Server, Tableau Online and Tableau Reader, where people can take advantage of the perks of Tableau.

Features of Tableau 

  • Tableau offers collaboration and sharing features for the users to work together and share data from different data sources.
  • Tableau's 'Ask Data' function makes the tasks super easy for users. It is as simple as doing a Google search.
  • Tableau's robust security system has authentication and permission features that play an important role too.
  • The Tableau application also supports mobile support.
  • By importing supported packages, users can also include various scripting languages like Python and R.


Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job

What is Context Filter in Tableau?

Filtering is an integral part of analysing data when working with significantly large data sources. The user can filter individual data points or a sample of data points from the dataset. In Tableau, data points are individual values or observations present in a dataset.

In Tableau, a Context filter is an ‘independent’ filter that can create a separate dataset, which is temporary, from the primary data set to compute the selections made in the worksheet, thus boosting the effectiveness and performance. This happens due to the fact that Tableau only processes the new or reduced dataset.

The temporary table is created as an Access table for Excel, Access, and text data sources. But for SQL Server, MySQL, and Oracle data sources, the app permissions should be approved in order to create temporary tables on the servers. And for multidimensional data sources, there are no temporary tables created.

The context filter can be used first, and then other Tableau filters can be applied on top of the context filter after the execution of the filtering process. Using only one context filter that remarkably reduces the size of the data set is much more reasonable than applying many context filters. But if you have multiple filters to be added to the context, it is more suitable to create all of the filters at first and then create a context that includes them all. After a brief introduction to context filters, we will move onto the types of filters in Tableau


Types of Filters in Tableau

Tableau is a powerful business intelligence tool that is used for effectively analysing and visualising vast amounts of data. 

While Tableau comes with many commands, one particular command is the Filter command. Filters are used to operate on data established on a predefined criteria. And this criteria limits the number of records in the database. Filters in Tableau come in the following types:

  • Extract Filter: This filter extracts subsets of data from the primary data source. This filter can be used while loading the dataset and it lowers the number of queries made for the data source. Measure or dimension filters can be clubbed with this filter.
  • Data Source Filter: This filter is used to limit sensitive data from the viewer. And also to lower the number of data feeds. This filter lets direct applications and quick upload of the source data. It also supports live and extracted connections.
  • Context Filter: this filter applies relevant content to the entire data analysis. We will give an introduction to context filters and implement them in the later sections of this article.
  • Dimension Filter: This filter accesses the highlighted values or removes them from a selected dimension. It gives us four options, General, Wildcard, Condition, and Top/Bottom. It is also customisable as one can add their own calculations. This filter is a non-aggregated filter. 
  • Measure Filter: Measure fields have quantitative data and this filter is used to perform operations like sum, average, median, standard deviation, and other functions. It provides us with four options, Range, At least, At Most and Special which are used to select different values of measures.
  • User Filter: This filter is used to protect the row-level data in a dataset. It restricts the from the user on the basis of who is viewing the dashboard. Different filtering criteria can be established as per different users using this filter.

Features of Context Filter

Here are the key features of a Context Filter in Tableau:

  • Improves Performance: When working with massive datasets, a generous amount of time is spent on queries. Context Filters come into play to improve this situation by creating temporary data sets based on the filter criteria. 
  • Dependent Filter Condition: Conditional filtering is one of the key features of Context filters in Tableau. Context filters generate conditional filtering customised to the user's parameters. When working with large datasets, context filters can be selected on categories, and then filters can be applied.
  • Integration: The context filter, along with the rest of the filters, are able to integrate with other features of Tableau. These features include operations like Arithmetic, Relational & Logical Operators, charts, maps etc.
  • Top N Filter: Dependent Numerical or Top N Filter can be arranged after setting a context filter to include only the data of interest as per the user.

Implementation of Context Filter

Creating a Context Filter

  • Create a database
  • Open the sample database in public or private mode.
  • To create a context filter, go to the existing categorical filter and click on ‘add to context’.
add to context
  • Click on the down arrow of the sub-category, and you will see the Filter window.

    • Show Filter: Shows all the available filters
    • Remove: Removes the sub-category
  • If you click the filter, another window will appear with 4 options.

    • General: Used to select any number of items from the list.
    • Wildcard: Used to match values from the dataset.
    • Condition: A statement having a minimum and a maximum value.
    • Top: Top 10 or 20 values or others. The same will be the case for ‘Bottom’, which may have Bottom 10 or 20 values or other.

Removing a Context Filter

  • Select the ‘Context Filter’ on the filters shelf.
  • Select ‘Remove from Context
remove from context

Frequently Asked Questions

What are the Measures and Dimensions in Tableau?

In Tableau, the measurable quantities of data that can be analysed by dimension tables are called Measures. These are kept in a table containing foreign keys that are unique to the related dimension tables. Dimensions categorise, segment, and display the details in the data.

What is a Data Engine in Tableau?

In Tableau, a Data Engine is an analytical database that is used to acquire instant query responses and predictive performance and meld seamlessly into the existing data infrastructure. Data Engines are typically used when one has to access data not natively supported by Tableau.

What is Data Joining and Data blending in Tableau?

Data Joining is used while merging datasets from the same source. The different types of join are Left Join, Right Join, Inner Join, and Full Outer Join. Whereas in Data Blending, the data does not come from the same source. Data Blending only uses left join.

What are Shelves and Sets in Tableau?

Shelves are columns, rows, filters, marks etc in a worksheet. Any visualisation structure can be made by placing filters on shelves. Seys are used to compute conditions on which the dataset is supposed to be prepared.

What is VIZQL in Tableau?

VizQL, or Visualisation Query Language, is used for loading and rendering views in Tableau. Essentially, VizQL is a translator for SQL queries used for efficient data analysis and is used to convert textured data into visualisations.


In this article, we explored the depths of context filters in Tableau with their features and implementations. Hope this introduction to context filters helped you in your learning journey.

Recommended Readings:

Also, check out some of the Guided Paths on topics such as Data Structures and AlgorithmsCompetitive ProgrammingOperating SystemsBasics of CBasics of Java, and Computer Networks, etc. as well as some Contests, Test SeriesInterview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Also, have a look at our Data ScienceData Analytics and Web Development courses here at CodingNinjas.

Happy Learning Ninja! 

Previous article
Implementing Tables in Tableau
Next article
Introduction to User Filter
Live masterclass