Before jumping into Tableau sets and creating sets, we will briefly review Tableau Groups.
In terms of the definition of a group, a group is a set of things or a collection of things based on some theme.
Groups allow us to organize and combine different values under a single label. Groups can be created for dimensions and measure values. It is shown by the paper clip icon.
There are quite a few ways to create groups.
From the Visualization control and select values, you want to group together and click on the paper clip group.
2.It might look like this as well.
3. Right-click on the new group created and name it stationary or something appropriate.
4. You can see this new group in your visualization.
Groups are static. If we want to change the members we can change it manually by editing the group.
Groups can be created from groups.
SETS
let's move on to sets now.
sets allow us to organize our data and put dimension values together.
We can create sets only on dimension values and not on measure values. Sets are more flexible and allow automatic member assignment, meaning we don't have to manually adjust values. For example, we create a set for the top 10 products. As the data changes the members(values) from this set change automatically.
because Sets are automatically assigned based on certain conditions and thresholds.
There are two types of sets in Tableau
1. Dynamic Set
In this type, changes in the underlying data change the members of a set. Dynamic sets are usually created based on a single dimension of the data.
2. Fixed Set
In this type, changes in the underlying data don’t change the members of a set. Besides, it is based on both a single dimension as well as many dimensions of the data.
How to Create Sets in Tableau?
1.Creating a Fixed Set
You must follow the following steps to create a Fixed Set in Tableau.
First, select more than one mark in the Tableau visualization.
Then, right-click on any one of the chosen marks and then select the ‘Create Set’ option.
A dialog box will open where you can enter a name for the fixed set
Either way, you can create a set. same way as a group, instead of selecting a group select set.
Different visualization to create Static or Fixed set for customer name.
After that, use the ‘exclude’ option to add the non-selected members to the set and then remove the selected members,
You need to click the ‘x‘ icon to remove any dimension.
If you don’t want to add rows to the set, you can remove the rows.
Suppose there is more than one dimension, you can separate members by entering characters of choice.
Now, select ‘Add to filters shelf’ to move the set to the ‘filters shelf automatically'.
Finally, click the ‘OK’ button to complete creating a fixed set.
Drag the set on visualization.
Drop down set and select show all members
Remove subcategory from Rows, we will be able to see sales for set of values we created in our set called Stationary
We can change the members of the set manually.
we can compare the group(created) and fixed set created to see difference.
2. Creating a Dynamic Set
You must follow the following steps to create a dynamic set in Tableau.
First, right-click a dimension in the data pane, and then choose ‘create’ > ‘set’.
Now, you will see the opening of the ‘create set’ dialog box. In this box, you will configure the set.
This dialog box contains three tabs: General, Top, and Condition.
Now, click the ‘General’ tab and click ‘Select from list’ to select specific members from a list.
To select all members of a list, click the ‘Use all’ button under the ‘General’ tab.
To select members of a set based on conditions, use the ‘Condition’ tab to select members from a list.
You can use the ‘Top’ tab to fix limits to the set. For example, if you want to add just five members to the set, then you can enter as 5 using the ‘Top’ tab.
Finally, click the ‘OK’ button to complete creating a dynamic set.
we will see some practical examples like top 50 customers by sale
Right click on Customer Name create set
2.select > By field> Top > 50 > Sales
3 Name the Set as Top 50 customers by sales , select OK
4. Create one more set as the Bottom 50 customers by profit. Follow the same steps as previously.
5. These are dynamic sets, the members will change as the data change over time.
One combined set is possible to create out of these two sets
Control Select " Top 50 customers by sale" set and hold control and select " Bottom 50 Customers by profit"
set
For now, we are selecting shared members from both sets. Name the set
All members in both set are called Union
Shared members in both sets are called Intersect
The bottom two are called Difference or Except
WE can put this new field ''TOP and Bottom customers by sale and profit" In columns , to see in and out members of the set, which means the members who are satisfying the intersect condition.
Or we can put that field in colors or size so that it can clearly show, in and out members based on the condition.
We can change the size according to our focus like in values bigger size.
double click on size legends and select the Reversed check box.
New field "Top and Bottom customers based on sales and profit " in colors.
" Show set " just like filters is available for dynamic sets only.
It is not available for a Combined set like union, intersect, or difference sets(for example new set, Top and Bottom 50 customers by sales and profit, derived from Top 50 customers and Bottom 50 customers)
Note: It is possible to create a combined set if and only if both sets are derived from the same dimensions.
In our example, both sets were created from the "customer names" dimension.
Example 2. Top and Bottom product by profit using Parameter
Right click product name > create > parameter> top > By field >profit> create a new parameter
2 . Name the parameter, and Select All Allowable values. hit ok
3. Create one more set on Product Name called Bottom product set.
4 . Name the set > By field > Bottom > select parameter Number of products > select field profit > ok
5. create combined set > control> select > Top Product name set > control > Bottom Product name set > create > combined set
Product Names > rows, profit > columns, > sort
"Top and Bottom products" > filter
This will show the top and bottom products in the same visualization.
I will add more examples to my tableau workbook and share the link here.
Thank you....