Learn Creating Sets in Tableau

What is Set

Set is a well defined collection of Values.

In Tableau, Set is a Custom Field which we can create to hold some or all Values of a Column based on a Particular Condition.

We Can create Set out of Variable by following methods
  • Selecting data from List
  • Based on a condition (It includes Condition based on another Field or it could be a Range of Values, or we can also create Formula for that)
  • By Selecting Top/Bottom Number of values.
We can create set of Dimensions only, but condition can be based on Measures as well.

For Example-  We want to select/Create a set of those Cities who has sales (Measure) more than 50Lac or we want to create set of Top 10 Cities based on Profit.

How to create Set in Tableau - 

It is very easy and user friendly software, We don't need to code a single line to create a Set in Tableau until and unless we want to use any special formula for that(That's required on very advance Level)
Choose a variable from dimensions which you want to use to create a Set and then right click on it and Choose Create -> Set..

See Example in below Screenshot -

Creating Set in Tableau by Datahark

Selecting data from List - we can choose Values available in data of a particular variable which we used to create Set. 
If we Choose Exclude option available on "Create Set" window then it will exclude selected items from that variable and take all other Values to create Set of those.


Based on a condition - We can choose Values based on condition, like if we want to create set of those Cities who have Sum of sales greater than 50,000, then create condition like shown in below image.
Similarly we can create other conditions as well.

By Selecting Top/Bottom Number of values -  We can create set of Top/Bottom Values as well, like if we want to create set of Top 10 Cities based on Sales, then Choose "Top" Tab and "By Field"  option shown in image -   


After Completing above setups Click on OK and your Set is ready to Use. Now the Question is - 

How to Use Created Set To Visualize data - 

Once you Create your Set by clicking on OK, It will Create a Set at the bottom of your Data Pane (See in Below Image), Now Drag and drop created Set in Row/Column Shelve as per your need and Click on "Show Members in Set" as Shown below 
Now Add other Measures or Variable you want to use for your Analysis - like, I Created a Chart which is Showing Sales of those Top 10 Cities who has most Profit.


Post a Comment