Background
In some business scenarios we can come across a requirement where we have to create a set, which will keep showing “Top 3” items even when using a filter. This is possible but requires some clear understanding of how Order of Operations work in Tableau. For example, we can have Departments, and when we filter on Departments to have Top 3 families displayed at all times. Various different dimensions and metrics can be combined to make such incredibly useful analysis. We can create a set to show the top 3 items.
Read more: Excel Data Source in Tableau Online »

Context Filter Approach
The scenario can be achieved using Context filters. Context filters are a way of simulating a data source filter, but localized to a particular view or views. So, for any given view, the context filter is applied first. Then any other filter acting on that view works as if the data filtered out by the context filter does not exist at all. This is the beauty of a Tableau Context filter and it will continue to return the expected data even we refresh our data. The Context filter will function automatically on the refreshed latest data to return the expected results.
Keep reading: Tableau Desktop Specialist Certification Questions »

Why Context Filter
Th reason why this method of using Tableau Context Filters will work effectively in our particular business scenario is because the context filter will relocalize our Top N list strictly to data that exists within the Context. Thus giving us the Top N list for that set of criteria. Otherwise without using Context, any filter will scan the entire data set, and create the Top N list, displaying the values that match our filters – hence the original Top N values might disappear as they can be filtered out. Hence it is important to test out our final analysis sheet and dashboard with a few different sets of data before confirming that it is working absolutely robustly.
Keep on Reading: Tableau Data Analyst Certification Questions »
Get our Most Popular Downloads
Download the most popular scenario-based Tableau Workbooks in .twbx format. Used by thousands of Tableau developers and job aspirants every day to improve and fine-tune their CV and Tableau Public profile. Join the largest Tableau Experts Social Group.

Banking & Financial Dataset Analysis
Financial Domain Tableau Dataset and Analysis. The most important domain in today’s industry. Analyze Key Performance Indicators. Discover Risky and Fraudulent Outliers. Download the Tableau Packaged (.twbx) Workbook. Includes a complete Financial dataset analysis. Enhance your Data Analytics experience with our skilled analysis.

Healthcare & Hospital Dataset Analysis
Hospital and Healthcare Domain Tableau Dataset and Analysis. A key field of study with millions of lives at stake. The most sensitive industry today. Download the Tableau Packaged (.twbx) Workbook. Understand how healthcare datasets work. Includes a complete Healthcare dataset with analytical charts. Explore Tableau interactive features with this download.

Insurance Dataset Analysis
Insurance Domain Tableau Dataset and Analysis. Important domain specific metrics and data. Learn how to visualize important metrics. Show outliers and insightful data points. Download the Tableau Packaged (.twbx) Workbook. Includes comprehensive analysis of Insurance data of a large sample population. Uses industry standard analytical practices.
First Working Day of the Quarter
Get the Tableau Workbook identifying the First Working Day of any Quarter of a Year.

By the Editorial Team
Tableau Practice Test
The best Tableau practice exams built. Period. Explore definitive practical problems created by brilliant Tableau experts.
One thought on “How to create a Set to show Top 3 even when we filter?”