Sets & Parameters in Tableau: A Road to Tableau Desktop Specialist Certification
Last Updated on July 26, 2023 by Editorial Team
Author(s): Daksh Trehan
Originally published on Towards AI.
Chapter 9: A comprehensive guide on Sets & Parameters in Tableau with Sample Certification Questions and free Udemy Dumps.
Welcome to the ninth chapter, In this piece, we are going to learn about sets and parameters in
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 6 July 2022):
Table of Content
- Sets
β Dynamic Sets
β Static Sets
β Adding/Removing data points from Sets
β Combining Sets
β Using Sets in viz
β Groups vs Sets
β Filters vs Sets
β Set Actions - Parameters
β Using Parameters in Filters
β Using Parameters in Calculations
β Showing Parameters control in Viz
β Parameters vs Filters - Sample Certification Questions from this Topic
Sets
Sets could be used to compare the subsets of the data. In simple words, these are useful in highlighting a subset of data specifying certain criteria. Sets are also known as pre-computed filters as they subset the data.
Sets could only be created on dimensions.
A set is itself a dimension.
A set is defined by a βVenn-diagramβ type of icon:
Sets can be created in two ways:
Dynamic Sets
The dynamic sets as the name suggests, are dynamic i.e. change when the underlying data is modified. These can be only based on a singular dimension.
To create a dynamic set:
Step1 β Right-click on a dimension, and choose βSetβ
Step2 β A dynamic set will give you three options to choose from General, Condition, Top.
General β Choose required data points manually.
Condition β You can add/create conditions based on fields on manual formulas.
Top β Using this option, we can define the range for which we can get values based on different fields/formulas.
The new set will be added to our data pane as a dimension.
Static Sets
The static sets, as the name suggests, are static i.e. donβt change even if the underlying data changes. These could be created either on singular or multiple dimensions.
To create a fixed set:
Step1 β Choose one or more marks in viz and choose the βCreate Setβ option.
Step2 β Give a name to the set.
We can also use the βExcludeβ option if we want to exclude all the selected data points.
A set will be added to the Data pane under the Dimension pane.
Adding/Removing data points from Sets
We can add/remove data points from sets in two ways:
- From the Data Pane.
Simply right-click on the set and choose βEdit Setβ.
We can then add/remove data points in the dialog box.
2. From the view.
Simply choose the desired points from the view.
Click on βAdd to Setβ or βRemove from Setβ as per desired results.
Combining Sets
We can combine two sets in Tableau.
To combine two sets, they must be based on the same dimension.
When we combine various sets, a new set is created that contains a combination of all the members or the members that exist in both or members that exist only in one set.
To combine various sets:
Step1 β Right-click on any set and choose βCreate Combined Setβ.
Step2 β Choose the set to combine and how to combine both sets.
Using sets in Viz
Sets are separate dimensions and could be dragged and dropped like any other field in Tableau.
When we drag a set to a row/column shelf, by default Tableau will show IN/OUT notation.
IN means the members present in the set. OUT refers to the member excluded from the set.
We can rename IN/OUT by either using aliases or calculated fields(if-else blocks)
We can either choose βShow Members in Setβ or βShow In/Out of Setβ.
If we choose βShow Members in Setβ, weβll only get output for the members present in the set.
Groups vs Sets
So basically, whatever Sets does we can also make it happen using Groups. But, then why do we use Sets?
Groups are only made on Static data and canβt be changed automatically based on changes in underlying data. But Sets can be used as both static or dynamic.
We can create unlimited Groups but for Sets, there could be only IN/OUT. Either the member would be in Set or not.
Sets can be used in calculated fields but we canβt use groups there.
Filters vs Sets
Sets are used to compare, whereas Filters are used to filter the data.
Sets can also be used as Filters, just drag them to the Filters shelf.
Filters and Sets are the same to an extent, but Sets are more of permanent filters as they could be re-used for the entire workbook whereas Filters can only be used for a single worksheet(by default).
Sets become metadata and hence could be used if a worksheet is using .tds files.
Filters change the view, but Sets add a dimension to the view.
Sets Actions
We know that when we use dynamic sets, the view change when underlying data is changed. But if users want to change the data, we can use Set actions to generate results as required by users.
Set actions update the value in the set.
To create a set action, choose Worksheet>Actions.
We can choose the action either for βThe workbookβ or βThe worksheetβ.
Choose βChange Set Valuesβ to update the sets based on user preferences.
Give a meaningful name to your action and choose the Source sheet and Target Set.
The action could be provoked in three ways:
- Hover β This will change the set, once the user hovers over any mark in the view.
- Select β This will trigger the action when the user will click on any mark in the view.
- Menu β This will trigger the action when the user will right-click on the mark and select an option on the context menu.
Choose how to run the action and what would happen when the view is cleared.
Parameters
Parameters are interactive tools to control the value of a variable. e.g. for a viz we might require the top 10 data points for a view but later might require the top 20, the users wonβt be going to change it manually, so we can simply put a parameter and users can tweak them to get desired values.
Creating a Parameter
Step1 β In the drop-down arrow in Data Pane, choose βCreate Parameterβ.
Step2 β Choose the name, data type and by default value for our parameter.
All β The parameter control would simply allow a text field.
List β The control would let you choose an option from the list.
Range β The control would let you choose an option within the specified range.
The availability of these options depends on the selection of datatype.
Step3 β Find the parameter in the Data pane.
Using Parameters in Filter
Parameters can help change the values for the top N filter. Users rather than changing the values manually can use Parameters.
To use a Parameter in Filter:
Step1 β Open the Filter dialog box and in the βTopβ option choose your parameter.
Step2 β Change the view by entering the number of titles you want.
Note: To show a parameter control in view. Right-click on Parameter and choose βShow Parameterβ.
Using Parameters in Calculation
Parameters can be used in calculations to modify the values and thus change the calculation dynamically.
To add parameters in calculations, simply drag and drop parameter in calculation dialog box.
Parameters Card
We can format our Parameters card, simply click on drop-down in parameter card in view.
Edit Parameter β It let you edit your parameter.
Show Title β It let you show the title of the Parameter.
Edit Title β It let you edit the title of your Parameter.
Format Parameters β It let you change the font, and color for your Parameters.
Type In β It let you change the way you enter the parameters, it could be a text box, slider, drop-down, etc. It depends on the data type of parameter.
Hide Card β It let you hide the parameters card.
Parameter Actions
We can add a parameter action to allow users to directly change the view by either hovering, clicking, or selecting the menu.
Step1 β To create a Parameter Action, go to Worksheet<Actions.
Step2 β Chose βChange Parameterβ.
Step3 β Choose Source Sheets, Target Parameter and how to trigger a Parameter.
The action could be provoked in three ways:
- Hover β This will change the set, once the user hovers over any mark in the view.
- Select β This will trigger the action when the user will click on any mark in the view.
- Menu β This will trigger the action when the user will right-click on the mark and select an option on the context menu.
Choose how to run the action and what would happen when the view is cleared.
Parameters vs Filters
Parameters arenβt as same as Filters, but they can be used to customize the filters.
Sample Exam Questions from this Topic
Sets can also be used as filters?
a. True
b. False
Solution: True
To create variable-sized bins, we use:
a. Sets
b. Groups
c. Histogram
d. Calculated Fields
Solution: Calculated Fields
Which of the following supports multiple data types?
a. Parameters
b. Filters
c. Sets
d. Groups
Solution: Parameters
Sets can be only created on dimensions?
a. True
b. False
Solution: True
Can we combine two sets together?
a. True
b. False
Solution: True
Use the link to get access to free Tableau certification dumps (Valid till 6 July 2022):
References:
[1] Tableau Help U+007C 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 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
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments 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