Filtering Data in Tableau: A Road to Tableau Desktop Specialist Certification
Last Updated on April 25, 2022 by Editorial Team
Author(s): Daksh Trehan
Originally published on Towards AI the World’s Leading AI and Technology News and Media Company. If you are building an AI-related product or service, we invite you to consider becoming an AI sponsor. At Towards AI, we help scale AI and technology startups. Let us help you unleash your technology to the masses.
Chapter 8: A comprehensive guide on Tableau Filters(Extract, Data Source, Context, Dimension, Measure, Table Calculation)
Welcome to the eighth chapter, In this piece, we are going to learn about different types of filters inΒ Tableau.
If you want to navigate through other chapters, visit: Tableau: What it is? Why it is the best?; A road to Tableau Desktop Specialist Certification.
If you want to directly go on Tableau Desktop Specialist notes, access them here β https://dakshtrehan.notion.site/Tableau-Notes-c13fceda97b94bda940edbf6751cf30
Use the link to get access to free Tableau certification dumps (Valid till 20 MayΒ 2022):
We know Tableau can work on either Live or Extract connection. Extract connection is preferred if we want faster computations and visualizations. But sometimes, there is a huge amount of data in our Extracts, which leads to even slower visualization and jittery experience. Thatβs where filters can help us, Tableau lets users filter their data, thus minimizing the corpus and boosting efficiency.
Tableau let users filter the view in threeΒ ways:
- Keep/Exclude dataΒ points
- Selecting Header
- Dragging and Dropping to FiltersΒ Shelf
There are 6 types of Tableau filters and by order of operation theyβre:
Table ofΒ Content
- Ways to Filter
β Keep/Exclude Data
β Selecting Headers
β Dragging & Dropping to FiltersΒ Shelf - Types of Filters
β Extract Filters
β Data Source Filters
β Context Filters
β Dimension Filters
β Measure Filters
β Date Filters
β Table Calculation Filters - Understanding FilterΒ Card
- Sample Question from thisΒ Topic
Ways toΒ Filter
Keep/Exclude Data
We can simply filter the data by selecting required data points from theΒ view.
By clicking on βKeep Onlyβ, it will remove every other dataΒ point.
By choosing βExcludeβ, it will exclude that dataΒ point.
Selecting Headers
To filter headers from the view, simply click onΒ them.
By clicking on βKeep Onlyβ, it will remove every other dataΒ point.
By choosing βExcludeβ, it will exclude that dataΒ point.
Dragging and Dropping to FilterΒ Shelf
To add filters to our view, simply drag and drop the dimension/measure to the filter shelf. Depending on the type of data, a dialog box wouldΒ appear.
Types ofΒ Filters
Tableau currently supports 6 types ofΒ Filters:
Extract Filters
These are the first kind of filters that users can access and use. Extracts are snapshots of live data that are used to boost performance. While creating extracts, we can filter irrelevant data and hide all unused columns to decrease the dataΒ load.
We can add desired dimension/measure as our filter and put further dimension/measure filters upon them(discussed in the latter part of this chapter).
Using this filter, Tableau will create an extract of filtered data that could be further used for visualizations.
Extract Filters are only available for the Single TableΒ option.
Data SourceΒ Filters
These filters are used to filter out data at the data source level. These work very similar to Extract Filters and can be accessed through the DataΒ pane.
We can choose any dimension/measure to filter and would be given further dimension/measure filters to choose from(discussed later in this chapter).
Extract Filters work only on Extract Connections.
Data Source Filters works on both types of connections.
Context Filters
Every other filter in Tableau is applied to all the rows by default irrespective of any other filter. In simple words, every filter works independently in our worksheets, but sometimes we want a co-dependent filter i.e. we want to put our second filter on the result of the first filter thatβs where context filters areΒ used.
Context filters create an order of operation for filters i.e. give a priority to a filter. The data which was earlier getting filtered independently now will be filtered on the data filtered by contextΒ filter.
One or more categorical filter that separates the dataset into major parts can be used as a context filter. All other filters used in the worksheet works based on the data filtered by the contextΒ filter.
Advantages of ContextΒ Filters:
- Improves performance β Use of context filters on large datasets can boost the performance as it reduces the data load on the TableauΒ engine.
- Dependent Filter Condition β It helps to create a dependent filter condition and thus provides solutions to certain scenarios.
To create a context filter, simply right-click on the filter and choose βAdd to Contextβ.
A context filter will always be shown in grayΒ color.
A context filter would always be applied first and the rest of the filters will be applied to data filtered by contextΒ filter.
A context filter can only be a dimensional filter. However, we can set 1 or more categorical filters as contextΒ filters.
To speed up context filters: do the data modeling before filtering, use bins for continuous dates.
Dimension Filters
These are the filters that can be used on non-aggregated pills i.e. blue pills. These filters can be applied to dimensions, sets, bins, andΒ groups.
To apply these filters, simply drag a blue pill to the Filter shelf, it will give you four options: General, Wildcard, Condition, andΒ Top.
In the General tab, we can simply include/exclude items manually by simply ticking themΒ on/off.
In the wildcard option, we can filter data based on someΒ pattern.
In the condition tab, we can put certain conditions or put custom formulas.
In the Top tab, we can specify top data based on either other columns or custom formulas.
Measure Filters
These filters are used only on aggregated data i.e. greenΒ pills.
To apply this filter, simply drag any green pill to the Filters shelf and Tableau will ask you about the aggregation on which you want your filters to beΒ applied.
After choosing aggregation, it will provide you with four options: Range of Values, At least, At most,Β Special.
Range of Values, At least, At most will let you choose the specified range for yourΒ measure.
If you choose Special, it will let you filter null/not-null values.
If you have a large data source, filtering measures can lead to a significant degradation in performance.
Date Filters
When we try to put the Date data type on the Filter shelf, we get exactly the same options as we get for dimension and measure filters for dimension date and measureΒ date.
We can choose if we want to filter our data according to Relative dates or Range of dates, we then get five options: Relative dates, Range of Dates, Starting date, Ending date, andΒ Special.
Date Parts vs Date ValuesΒ Filters
Table Calculation Filter
To create a table calculation filter, simply create a table calculation(to be covered in a later chapter) and drag it to the filterΒ shelf.
Table calculation filters have the least priority, these filters are applied to the views and not to yourΒ dataset.
Understanding FilterΒ Card
Tableau lets users change the way users interact with FiltersΒ cards.
Edit Filter β It lets you edit the filter by adding/removing moreΒ values.
Remove Filter β It lets you clear the filter from the filterΒ shelf.
Apply to Worksheet β Allows you to span the filter to other worksheets.
Format Filters and Set Controls β Allows you to format font and color for filterΒ cards.
Customize β It lets you control how the filter card would be visible in worksheet/dashboards.
Title β It would allow adding/removing title for filterΒ card.
Edit Title β It would allow editing the title for the filterΒ card.
Filter Card Modes β This option allows users to format their filter card i.e. the way they interact withΒ filters.
- Single Value(list): Displays the list of filters as a radio button with the option to only select one at aΒ time.
- Single Value(dropdown): Display the list of filters as a drop-down list with the option to only select one at aΒ time.
- Single Value(Slider): Display the filters as a slider with the option to only select one at aΒ time.
- Multiple Values(list): Display the filters as a list with the option to select multiple at oneΒ time.
- Multiple Values(dropdown): Display the filters as a dropdown with the option to select multiple at oneΒ time.
- Multiple Values(custom list): Display the text box where we can add multiple filters together.
- Wildcard Match: Displays the text box where we can add patterns like *,& filter the data. Pattern match is not case-sensitive.
Only Relevant Values β It allows users to only show certain values. It is highly useful while using ContextΒ filters.
All Values in Database β It allows users to add every value in the Database to filter regardless of otherΒ filters.
Include Values β It allows users to include all the selected values in theΒ view.
Exclude Values β It allows users to exclude all the selected values in theΒ view.
Hide Card β It hides the filter card, but donβt remove the filters from theΒ view.
Sample Exam Questions from thisΒ Topic
___ and ___ are the simplest filter options available in theΒ view.
a. Include
b. Exclude
c. Keep Only
d.Β Filter
Solution: Keep Only,Β Exclude
By Default, A filter only applies to the worksheet it is createdΒ in?
a. True
b.Β False
Solution: True
___ is an independent filter.
a. Context
b. Extract
c. Data Source
d. Dimension
Solution: Context
Multiple filters works with ___Β clause.
a. OR
b. AND
c. NOR
d.Β NAND
Solution: AND
The filters restricted to the current worksheet areΒ called?
a. LOCAL filter
b. RESTRICTED filter
c. CURRENT filter
d. REMOTEΒ filter
Solution: LOCALΒ filter
Use the link to get access to free Tableau certification dumps (Valid till 20 MayΒ 2022):
References:
[1] Tableau Help | TableauΒ Software
[2] PersonalΒ Notes
[3]Tableau Desktop Specialist Exam (New Patternβββ2021)βββApisero
Thanks forΒ Reading!
Feel free to give claps so I know how helpful this post was for you, and share it on your social networks, this would be very helpful forΒ me.
If you like this article and want to learn more about Machine Learning, Data Science, Python, BI. Please consider subscribing to my newsletter:
Find me on the Web: www.dakshtrehan.com
Connect with me at LinkedIn: www.linkedin.com/in/dakshtrehan
Read my Tech blogs: www.dakshtrehan.medium.com
Connect with me at Instagram: www.instagram.com/_daksh_trehan_
Want to learnΒ more?
How is YouTube using AI to recommend videos?
Detecting COVID-19 Using Deep Learning
The Inescapable AI Algorithm: TikTok
GPT-3 Explained to a 5-year old.
Tinder+AI: A perfect Matchmaking?
An insiderβs guide to Cartoonization using Machine Learning
How Google made βHum to Search?β
One-line Magical code to perform EDA!
Give me 5-minutes, Iβll give you a DeepFake!
Cheers
Filtering Data in Tableau: A Road to Tableau Desktop Specialist Certification was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.
Join thousands of data leaders on the AI newsletter. Itβs free, we donβt spam, and we never share your email address. Keep up to date with the latest work in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.
Published via Towards AI