Popular Searches
Popular Course Categories
Popular Courses

Creating Groups and Sets

Sorting, Filtering, and Grouping

Creating Groups and Sets in Tableau – Detailed Notes

Course: Tableau Training | Topic: Creating Groups and Sets | Level: Beginner to Intermediate

Learn more: JustAcademy Tableau Training | Register for a Tableau Course Demo


1. Introduction to Groups and Sets

Tableau provides Groups and Sets to help users organize, categorize, filter, and compare data. These features make it easier to analyze large datasets and create meaningful visualizations without changing the original source data.

For example, a company may have sales records for multiple cities, products, customers, and regions. Groups can combine related cities into broader regions, while Sets can identify a selected collection of customers or the top-performing products.

Learning Objectives

  • Understand the meaning and purpose of Groups and Sets.
  • Create and edit groups using dimensions.
  • Combine related dimension members into meaningful categories.
  • Create fixed and dynamic sets.
  • Use conditions and Top N rules to define set membership.
  • Compare members inside and outside a set.
  • Combine sets and apply them to charts and dashboards.
  • Build practical Tableau reports using Groups and Sets.

2. What Are Groups in Tableau?

A Group combines two or more related members of a dimension into a single category. Groups are useful when the original data contains many individual values that can be organized into broader categories.

Example

Suppose a sales dataset contains these cities:

  • Mumbai
  • Pune
  • Nashik
  • Delhi
  • Jaipur
  • Lucknow

You can create a group called Western India containing Mumbai, Pune, and Nashik, and another group called Northern India containing Delhi, Jaipur, and Lucknow.

Original City Group
Mumbai Western India
Pune Western India
Nashik Western India
Delhi Northern India
Jaipur Northern India
Lucknow Northern India

After creating the group, Tableau can display sales by region instead of displaying a separate value for every city.

Common Uses of Groups

  • Data cleanup: Combine variations such as CA, Calif., and California into one category.
  • Business categorization: Combine products, cities, or departments into meaningful categories.
  • Reporting: Simplify charts containing too many dimension members.
  • Comparison: Compare selected categories against other categories.
  • Analysis: Perform what-if analysis by combining members into custom categories.

3. How to Create a Group in Tableau

Method 1: Create a Group from the Data Pane

  1. Open Tableau Desktop and connect to a dataset.
  2. Locate the dimension you want to group in the Data pane, such as City, Category, or Product Name.
  3. Right-click the dimension.
  4. Select Create → Group.
  5. The Create Group dialog box opens.
  6. Select the members you want to combine.
  7. Click the Group button.
  8. Rename the group with a meaningful name.
  9. Click OK to save the group.
  10. Find the new grouped field in the Data pane and drag it into your visualization.

Method 2: Create a Group from a Visualization

  1. Create a chart containing the dimension members you want to group.
  2. Select the relevant marks or headers in the visualization. Use Ctrl or Shift where appropriate to select multiple items.
  3. Right-click the selected items or use the Group option available in the view.
  4. Tableau combines the selected members into a group.
  5. Rename the group if required.

Example: If a bar chart displays sales for Mumbai, Pune, and Nashik, select these city marks and group them into Western India.

Important Notes

  • Groups are created from dimension members.
  • You can rename groups to make them understandable to report users.
  • You can edit an existing group to add or remove members.
  • The original source data is not rewritten by creating a group in a Tableau worksheet.

4. Editing and Managing Groups

After creating a group, you can modify it as your analysis changes.

How to Edit a Group

  1. Locate the grouped field in the Data pane.
  2. Right-click the field and select Edit Group.
  3. Select members to add, remove, or reorganize them.
  4. Use Group, Ungroup, or Rename as needed.
  5. Click OK to apply your changes.

Understanding the Other Group

The Other group can collect members that have not been assigned to your explicitly defined groups. It is helpful when you want to highlight selected categories while keeping the remaining members together.

Example: A product report may have groups called High Performers and Low Performers. Other can contain all products that are not assigned to either group.

Group Example Members Purpose
High Performers Product A, Product B Highlight successful products
Low Performers Product C, Product D Identify products needing improvement
Other Remaining products Keep other members together

Tip: Use meaningful group names and review the Other group when new dimension members appear in your data.


5. What Are Sets in Tableau?

A Set is a custom field that defines a subset of data based on selected members or specified conditions. Sets help analysts identify a particular collection of records and compare it with the rest of the data.

Unlike a group, which combines dimension members into categories, a set identifies which members belong to a defined subset. Tableau commonly represents set membership through In and Out categories.

Example

Suppose a company has 1,000 customers. You want to identify the top 100 customers based on sales. You can create a set called Top 100 Customers and compare their sales with the sales of all other customers.

  • In: Customers included in the set.
  • Out: Customers not included in the set.

Common Uses of Sets

  • Identify top-performing customers or products.
  • Analyze customers who meet a sales threshold.
  • Compare selected customers against all other customers.
  • Compare customer groups across different periods.
  • Build interactive visualizations using set controls and set actions.
  • Measure the contribution of a subset to total sales or profit.

6. Types of Sets in Tableau

6.1 Fixed Sets

A fixed set is based on explicitly selected members. Its membership does not automatically recalculate from changing data values in the way a dynamic set does. A fixed set can be created from selected marks in a visualization and may include combinations of multiple dimensions.

Example: Create a set containing Mumbai, Pune, and Delhi because these cities are part of a specific business project.

6.2 Dynamic Sets

A dynamic set determines membership using the rules configured in the set definition. Its members can change when the underlying data changes and the set is recalculated. Dynamic sets are based on a single dimension.

You can define membership using the General, Condition, and Top tabs in the Create Set dialog box.

Example: Create a set of the top 10 customers by sales. When sales values change, the customers in the set can change accordingly.

Feature Fixed Set Dynamic Set
Membership Based on explicitly selected members Based on defined rules or conditions
Automatic changes Does not automatically recalculate membership from changing measure values Can update membership as underlying data changes
Dimension basis Can use one or multiple dimensions Based on one dimension
Typical use Track a selected list of customers Track the current top 10 customers

7. How to Create a Set in Tableau

Method 1: Create a Dynamic Set from the Data Pane

  1. Open Tableau Desktop and connect to your dataset.
  2. Identify the dimension for the set, such as Customer Name or Product Name.
  3. Right-click the dimension in the Data pane.
  4. Select Create → Set.
  5. Enter a descriptive name for the set.
  6. Use the General tab to select members or choose the option to use all members as the starting population.
  7. Use the Condition tab if membership should depend on a rule.
  8. Use the Top tab if membership should be based on the top or bottom values of a measure.
  9. Click OK to create the set.
  10. Locate the new field in the Sets section of the Data pane.

Method 2: Create a Fixed Set from a Visualization

  1. Create a visualization containing the marks you want to select.
  2. Select one or more marks or headers.
  3. Right-click the selection and choose Create Set.
  4. Enter a name for the set.
  5. Choose whether to include the selected members or exclude them.
  6. Click OK.

Note: The exact interface options may vary by Tableau version and authoring environment.


8. Understanding the General, Condition, and Top Tabs

8.1 General Tab

The General tab allows you to select which dimension members are included in the set. You can select specific values or use all available members as the starting population.

Example: Select Mumbai, Pune, and Nashik to create a set of customers or records associated with those selected cities, depending on the dimension used.

8.2 Condition Tab

The Condition tab allows you to define rules that determine which members belong in the set. You can use a condition based on a field or a formula.

Example: Include customers whose total sales are greater than or equal to ₹100,000.

8.3 Top Tab

The Top tab allows you to include a specified number of dimension members based on a measure. You can choose Top or Bottom and specify a count, percentage, or other supported limit options.

Example: Create a set containing the top 10 products based on SUM(Sales).

Tab Purpose Example
General Select members Selected cities
Condition Apply membership rules Customers with sales of at least ₹100,000
Top Limit members using rankings or values Top 10 products by sales

9. Understanding In and Out of a Set

When a set is used in a visualization, Tableau can show membership as two categories.

  • In: Records or dimension members that satisfy the set definition.
  • Out: Records or dimension members that do not satisfy the set definition.

Example: Top Customers

Suppose the Top Customers set contains three customers.

Customer Sales Set Membership
Customer A ₹500,000 In
Customer B ₹400,000 In
Customer C ₹350,000 In
Customer D ₹100,000 Out
Customer E ₹75,000 Out

Using In/Out membership, you can compare the sales generated by selected customers against all other customers.

How to Use In/Out

  1. Create a set from a dimension.
  2. Drag the set into Rows, Columns, Color, or another suitable shelf.
  3. Use the set's In/Out membership mode when available.
  4. Drag a measure such as Sales into the view.
  5. Compare the measure values for In and Out.

You can also display the individual members of a set rather than the two membership categories. In Tableau Desktop, the set menu provides options to switch between these views.


10. Combining Sets

Tableau allows you to combine two compatible sets based on the same dimensions. This is useful when comparing customer groups or other subsets.

Common Set Combination Options

  • All Members in Both Sets: Includes members from either set, similar to a union.
  • Shared Members in Both Sets: Includes only members present in both sets, similar to an intersection.
  • Except Shared Members: Excludes shared members from the specified first set, similar to a directional difference.

Example

Suppose you have two sets:

  • Set A: Customers who purchased in 2025.
  • Set B: Customers who purchased in 2026.
Customer Purchased in 2025 Purchased in 2026
Customer A Yes Yes
Customer B Yes No
Customer C No Yes
Customer D No No

Shared Members: Customer A, who purchased in both years.

All Members: Customers A, B, and C, who purchased in at least one of the years.

Set A except shared members in Set B: Customer B, who purchased in 2025 but not in 2026.

Steps to Combine Sets

  1. Create two sets based on the same dimension.
  2. Locate both sets in the Sets section of the Data pane.
  3. Select both sets using Ctrl or the appropriate selection method for your operating system.
  4. Right-click and select Create Combined Set.
  5. Enter a name for the combined set.
  6. Choose the desired combination option.
  7. Click OK and use the new set in your visualization.

11. Groups vs Sets: Key Differences

Feature Groups Sets
Main purpose Combine dimension members into categories Define subsets of dimension members
Membership Members are assigned to custom groups Members are included or excluded by selection or rules
Typical display Named categories In/Out or individual set members
Rule-based membership Primarily groups selected members manually Can use conditions and Top rules
Dynamic behavior New members may require group maintenance or may fall into Other if configured Dynamic sets can recalculate membership using their rules
Combining categories Combines members into categories Compatible sets can be combined using union, intersection, or difference-style logic
Example Combine cities into Western India Identify the top 10 customers by sales
Best for Organizing and simplifying dimensions Comparing selected members against others

12. Practical Example: Sales Analysis Using Groups

Scenario: A retail company wants to compare sales across broad geographical regions instead of individual cities.

Sample Data

City Sales
Mumbai ₹250,000
Pune ₹180,000
Nashik ₹120,000
Delhi ₹300,000
Jaipur ₹150,000
Lucknow ₹100,000

Steps

  1. Connect Tableau to the sales dataset.
  2. Right-click City in the Data pane and choose Create → Group.
  3. Group Mumbai, Pune, and Nashik as Western India.
  4. Group Delhi, Jaipur, and Lucknow as Northern India.
  5. Rename the grouped field to Sales Region.
  6. Drag Sales Region to Rows.
  7. Drag Sales to Columns.
  8. Choose a bar chart and format the labels.

Expected Regional Totals

Sales Region Total Sales
Western India ₹550,000
Northern India ₹550,000

Business insight: Both regions generate equal total sales in this example. The company can use additional measures such as profit, orders, and growth to investigate regional performance further.


13. Practical Example: Top Customers Using Sets

Scenario: A company wants to identify its top five customers by sales and compare them with all other customers.

Steps

  1. Right-click Customer Name in the Data pane.
  2. Select Create → Set.
  3. Name the set Top 5 Customers.
  4. Open the Top tab.
  5. Choose Top 5 by SUM(Sales).
  6. Click OK.
  7. Drag the set to Rows or Color.
  8. Drag Sales to Columns.
  9. Compare the In and Out categories.

Possible Business Questions

  • What percentage of sales comes from the top five customers?
  • How much more profitable are top customers?
  • Are top customers concentrated in a particular region?
  • How does the set change when new sales data is added?

Important: Verify how the Top rule is calculated and which filters are applied. The results can depend on the dimension, measure aggregation, and Tableau's order of operations.


14. Using Groups and Sets in Dashboards

Groups and Sets can make dashboards easier to explore. Groups simplify categories, while sets can help users compare a selected subset with the remaining data.

Dashboard Ideas

  • Regional Sales Dashboard: Use grouped cities to compare regional sales.
  • Top Customers Dashboard: Use a set to compare high-value customers with others.
  • Product Performance Dashboard: Use groups for product categories and sets for top-performing products.
  • Customer Retention Dashboard: Compare customers who purchased in two different periods using compatible sets.

Set Controls and Set Actions

A set control can let users change membership in a dynamic set through a filter-like interface. Set actions can update set membership when users interact with marks in a visualization. These features can make dashboards more interactive.

Example: A user selects a group of products in a chart, and a set action updates a subset used in another chart for comparison.


15. Common Mistakes and Troubleshooting

Problem Possible Reason Solution
Group option is unavailable Selection or field type does not support the expected operation Check that dimension members or marks are selected correctly.
Some members appear in Other They have not been assigned to an explicit group and Other is enabled Edit the group and review the Other setting.
Set contains unexpected members Top or Condition rules use a different aggregation or population than expected Review the set definition and the view's filters.
Set membership does not change as expected The set is fixed or its dynamic rule does not match the intended behavior Review the set type and its General, Condition, or Top settings.
Combined set cannot be created The sets may not be based on compatible dimensions Confirm that both sets are based on the same dimension or compatible member structure.
Sales totals appear incorrect Aggregation, duplicate records, filters, or level of detail may affect the result Validate the data, aggregation, and filter configuration.

16. Best Practices for Groups and Sets

  • Use descriptive names such as Western India Cities or Top 10 Customers.
  • Use groups when the main goal is to organize dimension members into understandable categories.
  • Use sets when the main goal is to identify a subset or compare it with the remaining data.
  • Check whether new dimension members need to be added to manually maintained groups.
  • Use dynamic sets when membership should be determined by a changing rule.
  • Validate Top N results against the intended measure and aggregation.
  • Use In/Out views to compare subset performance with the rest of the dataset.
  • Keep dashboards clear by avoiding unnecessary groups, sets, and colors.
  • Test calculations and filters before publishing a dashboard.

17. Interview Questions and Answers

Q1. What is a Group in Tableau?

Answer: A Group combines related members of a dimension into a single category. It is commonly used to organize data and simplify visualizations.

Q2. What is a Set in Tableau?

Answer: A Set is a custom field that identifies a subset of dimension members based on selected values or rules.

Q3. What is the main difference between Groups and Sets?

Answer: Groups organize members into custom categories, whereas Sets define membership in a subset that can be analyzed separately or compared with the rest of the data.

Q4. What are fixed and dynamic sets?

Answer: Fixed sets use explicitly selected members. Dynamic sets determine membership using rules and can update membership when the underlying data changes.

Q5. What is the Other group?

Answer: Other can collect dimension members that are not assigned to explicitly defined groups when the option is enabled.

Q6. What do In and Out mean in a set?

Answer: In represents members included in the set, while Out represents members excluded from it.

Q7. How do you create a group in Tableau?

Answer: Right-click a dimension and select Create → Group, select the required members, group them, rename the group, and click OK.

Q8. How do you create a dynamic set?

Answer: Right-click a dimension, select Create → Set, configure the General, Condition, or Top tab, and click OK.

Q9. Can you combine two sets?

Answer: Yes. Compatible sets based on the same dimension can be combined to include all members, shared members, or members in one set excluding shared members from the other.

Q10. When should you use a set instead of a group?

Answer: Use a set when you need to identify a subset, apply rule-based membership, or compare selected members with other members. Use a group when you need to combine individual dimension values into broader categories.

Q11. Can sets support interactive dashboards?

Answer: Yes. Dynamic sets can be used with set controls, and set actions can update membership based on user interaction.

Q12. Give a real-world example of a group and a set.

Answer: A group can combine Mumbai, Pune, and Nashik into Western India. A set can identify the top 10 customers based on sales.


18. Practice Exercises

  1. Create a group that combines several cities into one region.
  2. Create a group that combines related product categories.
  3. Enable an Other group and inspect which members it contains.
  4. Create a fixed set containing selected customers.
  5. Create a dynamic set containing the top 10 products by sales.
  6. Create a condition-based set for customers whose sales exceed a specified threshold.
  7. Display a set in In/Out mode and compare total sales.
  8. Create two customer sets for two different years and find their shared members.
  9. Build a dashboard showing grouped regional sales and top-customer performance.
  10. Test how the results change when data or filters change.

19. Mini Project: Regional Sales and Top Customer Analysis

Project Objective: Build an interactive Tableau dashboard using Groups and Sets to understand regional sales performance and identify high-value customers.

Requirements

  • Dataset containing Order Date, City, Customer Name, Product Category, Sales, and Profit.
  • A grouped field that combines cities into regions.
  • A dynamic set containing the top 10 customers by sales.
  • An In/Out comparison of sales from top customers versus other customers.
  • A bar chart comparing total sales by region.
  • A chart showing sales by product category.
  • Clear titles, labels, legends, and appropriate formatting.

Project Workflow

  1. Connect to the dataset.
  2. Check data types and validate the Sales and Profit measures.
  3. Create a City Group and rename it Sales Region.
  4. Create the Top 10 Customers set based on SUM(Sales).
  5. Build a regional sales bar chart.
  6. Build a customer sales comparison using In/Out.
  7. Add the charts to a dashboard.
  8. Apply relevant filters and test the results.
  9. Write three business observations based on the completed dashboard.

Expected Learning Outcome

After completing this project, you should be able to organize dimension members, create rule-based subsets, compare set members, and communicate business insights through Tableau visualizations.


20. Quick Revision Checklist

  • ☐ I understand the purpose of Groups.
  • ☐ I can create and edit a group.
  • ☐ I understand how the Other group works.
  • ☐ I understand the purpose of Sets.
  • ☐ I know the difference between fixed and dynamic sets.
  • ☐ I can configure General, Condition, and Top set rules.
  • ☐ I can interpret In and Out membership.
  • ☐ I understand how compatible sets can be combined.
  • ☐ I can use Groups and Sets in charts and dashboards.
  • ☐ I can validate results and troubleshoot unexpected membership.

21. Conclusion

Groups and Sets are useful Tableau features for organizing and analyzing data. Groups help combine related dimension members into clear categories, while Sets help identify subsets based on selected members or defined rules. Understanding when to use each feature makes it easier to build accurate charts, compare performance, and create interactive dashboards.

Continue learning with JustAcademy Tableau Training. To explore a course demo, visit Register for a Tableau Course Demo.

Official References

whatsapp