Defining Subsets of Your Data

Defining subsets of your data helps you to filter some of the interesting points in your dataset and visualize it individually or compare it with the rest of the dataset. Generally, there are two types of sets in the Tableau Desktop known as:

  • Dynamic subsets: the members of a dynamic set change when the underlying data changes. Dynamic sets can only be based on a single dimension.

  • Fixed subsets: the members of a fixed set do not change, even if the underlying data changes. A fixed set can be based on a single dimension or multiple dimensions.

Dynamic subsets

In order to create dynamic subsets, right click on any dimension in the Data pane and choose Create --> Set.

Now, you can define the name of the set, choose the members from the list or excluding the unwanted members. Here, we will choose for County field, the counties of Anderson, Greenville, Pickens, and Oconee.

Furthermore, it is possible to create the set based on a defined condition on any field available in the dataset. In this example, we will put a condition to choose the counties that their number of cases of COVID-19 are greater than 5000.

Finally, it is possible to create set based on choosing the top members according to a defined field. For example, in this section, another set is created based on choosing top 5 counties based on average number of cases of COVID-19.

Now, let's use these defined sets in our visualization. For example, drag and drop the County Set 3 that was created by choosing the top 5 counties due to number of cases of COVID-19 into the markers. The first mode of visualization by using sets is called IN/OUT which means the IN category shows the visualization of members that are included in the set and OUT category shows the visualization of members that are excluded from the set. You can choose this mode by clicking on the County Set 3 in the markers section.

This mode of visualization looks like this.

Another mode of visualization based on using the set is to visualize the data based on only the members that are included in the set. You can choose this mode by clicking on the County Set 3.

Visualization of this mode looks like this.

Fixed subsets

In order to create fixed subsets, you can choose the data points that you want to use in your set interactively in your visualization and create a set.

The final visualization based on fixed set looks like this.

Combine sets

It is possible to combine two or more sets together to create a new set. In order to combine sets, choose your wanted sets and then right click on one of them and choose Create Combined Set.

Now, you can define the name of the new combined set and choose the mode of the combination as.

In this example, we choose All members in both sets, which results in this visualization.