Sets in Tableau are a powerful feature that allow us analysts to segment data dynamically and interactively. This blog post will dive into everything you need to know about Sets, covering their creation, functionality, and use cases so you can use them with confidence.
What Are Tableau Sets?
Tableau Sets divide data into two groups based on specific criteria:
- In-group: Contains data points meeting a criteria (members of the set)
- Out-group: Contains data points that do not meet the criteria
This means Sets are like Boolean data types with just descriptive values, but with In or Out instead of TRUE of FALSE.
Why are Sets useful?
Sets are essential for:
- Focused Analysis: Zoom in on subsets of your data for deeper insights.
- Comparative Analysis: Compare subsets against each other.
Types of Sets
1. Fixed Sets
Fixed sets are created manually by selecting specific data points to include or exclude them.
- Example: Manually select product names to a set while excluding others.
2. Dynamic Sets
Dynamic sets update automatically based on conditions or rankings.
- Condition-Based: Define rules such as "Profit > 50".
- Rank-Based: Include top or bottom performers (e.g. top 10 customers by revenue).
3. Combined Sets
Combined sets merge two existing sets using logic similar to database joins:
- All Members in Both Sets: Includes all members from either set.
- Shared Members in Both Sets: Includes only members present in both sets.
- Set 1 Except Shared Members: Includes members of Set 1 but excludes those also in Set 2.
- Set 2 Except Shared Members: Includes members of Set 2 but excludes those also in Set 1.
Practical Use Cases for Tableau Sets
Highlight Subsets in Vizzes
- Drag the set to the Colors Marks Card for visually differentiating members of and outside of the set.
- Customize colors for "In" and "Out" groups.
Filter Data for Focused Views
- Right-click the set and choose Show Filter to display only the "In" group in your view.
Interactive Filtering for End Users
- Add the set as a filter:
- Right-click the set and select Show Filter.
- Users can toggle between "In," "Out," or "All" groups.
Dynamic Set Membership
- Enable users to modify set memberships dynamically using Actions:
- Worksheet > Actions > Add Action > Change Set Values.
- Configure actions to add or remove members based on user clicks.
Summary
Tableau Sets are a versatile tool for segmenting, analyzing, or even interacting with data. Sets can be fixed (Manually selected, static groups), dynamic (Automatically updated based on rules or rankings) or combined (Merged sets using logical operations) and allow for enhanced focus on specific subsets of data, dynamic and interactive filtering or a simplified comparative analysis.
I hope this post was helpful to the ones that were curious about sets and their functionality or that you had fun reading this post.