How to Create Sets in Tableau

How to Create Sets in Tableau

4 mins read453 Views Comment
Vikram
Vikram Singh
Assistant Manager - Content
Updated on May 24, 2022 08:29 IST

In this article, we will briefly discuss one of the tableau’s most powerful analytic features i.e. sets in tableau and how to create, use and delete them.

2022_05_feature-images_TABLEAU-SETS.jpg

Table of Content

Recommended online courses

Best-suited Tableau courses for you

Learn Tableau with these high-rated online courses

39.54 K
2 hours
– / –
45 hours
– / –
4 weeks
– / –
4 weeks
2.25 K
4 weeks
Free
12 hours
– / –
1 hours
19.89 K
16 hours
– / –
3 hours
19.7 K
6 months

What are Tableau Sets?

Sets are custom fields that define a subset of data based on some conditions defined by the users. 

In simple terms, creating sets in tableau means putting multiple values in a single set depending on user conditions. 

It allows for isolating a specific segment of any dimension and can be used as per the user’s need to find insights into your data.

Note: Set conditions work the same as filter conditions.

Must Check: What is Tableau?

In the tableau, sets are classified into two categories:

  • Dynamic Sets
  • Fixed Sets

Dynamic Sets:

  • The member of the dynamic sets changes when the underlying data changes. 
  • Dynamic sets can only be based on a single dimension.

Fixed Sets:

  • The member of the fixed sets does not change when the underlying data changes too.
  • A fixed set can be based on single or multiple dimensions.
Dimension and Measure in Tableau
Connecting data in Tableau
Create Table, line chart and Scatter Plot using Tableau Show Me

How to create Tableau Sets?

Dynamic Sets

  • Connect to Sample Superstore Data
  • From the data pane -> Right Click on Dimension -> Select Create -> Select Set

  • Create Set Dialogue Box will appear
  • In Create Set box, we have three tabs:
  • General
    • In the general tab, you can select one or more or use all values
2022_05_dynamic_set_create-set-box.jpg
  • Condition
    • In the condition tab, you can define rules to determine which members to include
      • Select By Field
      • Select the Category
      • Select the required Count
      • Select the Condition (=, <, <=, <>, >, >=)
      • Put the required Value
2022_05_dynamic-set_create-set-box_condition.jpg
  • Top
    • In the top tab, you can define the limits on the members to include in the set
      • Select Top/Bottom
      • Enter the number of values you want to include (manually)
      • Select the Category
      • Select the Count
2022_05_dynamic-set_create-set-box_top.jpg
  • Click OK

Fixed Sets

To create fixed sets, we need visualization. So first, we create visualization:

  • Drag and Drop Profit, and Sales into column shelf and row shelf respectively
  • Drag and Drop Region into color under the Mark Pane
  • Drag and Drop Category and Sub-category into details under the Mark Pane
2022_05_fixed-set_create-visualization.jpg

Now, move to create a fixed set:

  • Select one or more marks( by scrolling the mouse)
  • Right-click on any Mark – > Select Create Set
2022_05_fixed-set_select-create-set.jpg
  • Create Set Dialogue Box will appear
    • Type the name of the set
2022_05_fixed-set_create-set-dialogue-box.jpg
  • By default, it will contain all the members of the field (you selected)
    • On the top right-hand side, you will get Exclude
      • This will exclude all the members you selected for analysis
    • You can directly, remove any of the dimensions or rows by clicking on the red cross button(x) while moving over a column heading or row heading.
    • Using Separate Members By you can specify the character that separates the dimension’s value
    • Select Add to Filters shelf
    • Click OK
  • A new set will be added at the bottom of the data pane under the set section.

Must Check: Tableau Online Courses & Certifications

How To Combine Sets?

In the tableau, sets are combined to compare the members of the fields.

It allows for answering complex questions and comparing cohorts of data for analysis.

A new set is created by combining two or more sets and will consist of either:

  • combination of all the members of both the sets
  • Common member in both the sets
  • Member exist in one set but not in the second set

Steps to Combine:

  • Select the two sets under the Sets section from the Data Pane
    • Right – Click the Sets -> Select Create Combined Columns
  • Create Set Dialogue Box will appear
    • Type the name of the set
    • Verify that both the sets you want to combine are selected from the drop-down
    • Select one of the options(how to combine sets):
      • All Members in Both Sets
      • Shared Members in Both Sets
      • Except Shared Members 
  • Click OK

Add or Remove Data Points from Sets

After the set is created we can add or delete data points from the sets:

  • From the visualization, select the data point you want to add or delete.
    • Click on the data-point
    • Click the drop-down
    • Select Add to or Remove from (as per our requirement)
2022_05_set_add-or-remove-data-point-from-sets.jpg
Tableau Operators: Arithmetic, Comparison and Logical
Union in Tableau: Create, Rename and Remove
Sort Data in Tableau

Conclusion

In this article, we have discussed sets in tableau, how to create sets, how to combine sets and how to add or remove data points in sets.

Hope this article will help in your data analytics journey.

Top Trending Articles:

Data Analyst Interview Questions | Data Science Interview Questions | Machine Learning Applications | Big Data vs Machine Learning | Data Scientist vs Data Analyst | How to Become a Data Analyst | Data Science vs. Big Data vs. Data Analytics | What is Data Science | What is a Data Scientist | What is Data Analyst

About the Author
author-image
Vikram Singh
Assistant Manager - Content

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio