Tableau Group

What is Tableau Group?

Tableau Group is a feature in Tableau that combines related members in a field into a category. These groups or categories can be further used for data analysis. For example, suppose you have a data field that contains multiple values related to different fruits and vegetables. In that case, you can create groups by combining all the fruits under a group Fruits and all the vegetables under the group Vegetables.

Tableau groups are highly beneficial for a couple of reasons.

  1. You can amend any data errors or format issues by combining different value formats into a single data point.
  2. Enables you to experiment with data by letting you answer “what-if” type questions by grouping different types of values.
Key Takeaways
  • Tableau Group is a functionality that combines related members in a field into a category.
  • You can create a Tableau group using either the Data pane or the Tableau view. 
  • You can edit an existing group to add new groups, remove the existing groups, and change the group name or the grouped fields in Tableau. 
  • Tableau groups can be created based on calculated fields or even combined groups. 
  • Tableau group can help you address data errors and what-if analysis by combining different data values.
  • Tableau groups are not dynamic, and the members of a group remain static until the group is edited.

How to Create a Group in Tableau?

Tableau provides multiple ways to create a group for your dataset. They include:

  • Using the Data pane
  • Using the view

#1 – Using the Data Pane

To create a Tableau group data using the Data pane in Tableau, follow the instructions outlined below:

Step 1: Connect your dataset to the Tableau interface.

Step 2: In the Data pane, right-click a field. Select Sub-Category – Create – Group.

Tableau Group - Create Data pane - Step 2

It will open a Create Group [Field Name] dialog box.

Step 3: In the Create Group dialog box, select all those values for which you want to create a group, and then click on the Group button.

Tableau Group - Create Data pane - Step 3

Tableau will combine the selected values into a Tableau group data. By default, Tableau will assign a name to the group.

Step 4: Provide a meaningful name to the group data and click on OK.

Tableau Group - Create Data pane - Step 4

Tableau will create a group visible in the Data pane.

Tableau Group - Create Data pane - Step 4 - data pane

Note that Tableau also provides an Include Other option that allows you to group all the remaining values that are not part of any group in the Other group. You can create this Tableau group data by selecting this checkbox.

Tableau Group - Create Data pane - Step 4 - checkbox

#2 – Using the View

To create a group data using the view in Tableau, follow the instructions outlined below:

Step 1: Create a data visualization in Tableau by dragging the data fields to the view.

Tableau Group - Create - View - Step 1

Step 2: In the view, select the relevant values you want to group, and on the tooltip that appears on the view, select the group icon .

Tableau Group - Create - View - Step 2

Tableau will automatically create a group based on your selection which will be visible in the Data pane.

Tableau Group - Create - View - Step 2 - group 1

Note: You can’t create group columns through the grouping feature. It only combines the member values into a particular group.

Once you have created a Tableau group, you can perform the count to categorize data as per their occurrences. For example, calculating the total number of orders in a combined group data.

The usage of Tableau group measure names is not a very common practice. Measures are typically created to perform calculations as they store numeric values.

How to edit a group in Tableau?

You can edit an existing group in Tableau to further add new groups, remove the existing groups, and change the group name or the grouped fields.

To edit an existing group in Tableau, follow the steps highlighted below:

Step 1: In the Data pane, select the group you want to edit and right-click on it. From the context menu, choose the Edit Group… option.

Tableau Group - Edit - Step 1

Step 2: Select the values for which you want to create a new group and then click on Group.

Tableau Group - Edit - Step 2

Tableau will create a new group as per your selection of values.

Step 3: Repeat the process in step 1 to open the Edit Group screen.

Tableau Group - Edit - Step 3

As part of the Edit group options, you can further create new groups, rename existing groups, or ungroup any grouped data using the options provided.

Step 4: To ungroup an existing group, select a group on the Edit Group window and click on Ungroup.

Tableau Group - Edit - Step 4

Now you can see Tableau has ungrouped the members of the existing group.

Tableau Group - Edit - Step 4 - Ungroup

Step 5: Similarly, you can edit an existing group by adding more members to the group. On the Edit Group window, select the members to add to an existing group. 

Edit - Step 5

Drag and drop those members to the group. Now you can see the existing group has added the selected values to the group.

Edit - Step 5 - Members

Examples

In this section, we will go through different examples demonstrating the Tableau group functionality.

Example #1 – Grouping based on Calculated Fields

In this example, we will demo grouping based on calculated fields in Tableau using the United States Store Sales Data dataset. This dataset contains the purchased item list such as data on Sales Price, Quantity of purchase, Profit, Delivery date, salesperson, States, Order Status, etc.

To create a grouping based on calculated fields in Tableau, follow the instructions highlighted below:

Step 1: Connect with the United States Store Sales Data to the Tableau interface using the File Navigator. The imported data can be viewed in the Data Source tab.

Tableau Group - Example 1 - Step 1

Step 2: Navigate to a new worksheet. Under the Data pane, you will see the list of fields for the imported table.

Tableau Group - Example 1 - Step 2

Step 3: In the Data pane, right-click and select Create Calculated Field…

Tableau Group - Example 1 - Step 3

Step 4: In the Calculated Field window, provide a meaningful name and specify the logic to create the field.

Here we have created a field called Performance Category to identify the strong sales, average sales, below average sales, and Poor sales based on the profit numbers.

Tableau Group - Example 1 - Step 4

Step 5: Once you click on OK, Tableau will create the group visible in the Data pane. Right-click on the field and select Create – Group from the context menu. 

Tableau Group - Example 1 - Step 5

Step 6: In the Create Group window, select the values and click on the Group button to create a new group.

Tableau Group - Example 1 - Step 6

Step 7: Provide a meaningful name to the group and click on OK. Here, we have named the group as Considerable Sales by combining Strong Sales and Average Sales.

Tableau Group - Example 1 - Step 7

Step 8: In the Data pane, again right-click on the field and select Edit Group.

Tableau Group - Example 1 - Step 8

Step 9: Tick the Include Other checkbox. As you can see, Tableau has placed all the remaining data values under the Other group.

Tableau Group - Example 1 - Step 9

Step 10: Now drag and drop the group field along with other fields to the Rows and Columns shelf to create a view. Tableau will create a data visualization based on the grouped values.

Tableau Group - Example 1 - Step 10

Example #2 – Using Sets for Grouping

In this example, we will demonstrate how to use sets in Tableau for Grouping . For this demo, we have used University Students Data which contains a list of all the universities across the US states along with other information such as student applications, acceptance, enrolment, undergrad, outstation, and other details.

To use sets for grouping in Tableau, follow the step-by-step guide provided below:

.Step 1: Import the University Students Data into the Tableau interface.

Example 2 - Step 1

Step 2: Drag the University Name to the Rows shelf and Enroll to the Columns shelf.

Example 2 - Step 2

Step 3: Sort the view in descending order as per the enrolment figure by clicking on the Sort icon as shown below.

Tableau Group - Example 2 - Step 3

Step 4: Select the Top University list as per the enrolment figure and on the Tableau tooltip that appears on the screen, select the set icon and choose Create Set.

Tableau Group - Example 2 - Step 4

Step 5: Specify a meaningful name and click on OK.

Tableau Group - Example 2 - Step 5

Step 6: In the view, drag the newly created set to the Rows shelf.

Tableau Group - Example 2 - Step 6

Step 7: Select the list of universities you want to group in Tableau and in the tooltip that pops up on the screen, select the group icon.

Tableau Group - Example 2 - Step 7

Tableau will create a group as shown in the view.

Tableau Group - Example 2 - Step 7 - Group

Example #3 – Nesting and Combining Groups

In this example, we will demo creating nesting and combining groups in Tableau using the Waterloo Enrolment 2024 dataset. This dataset contains the student enrolment details such as Term Type, Career, Program level, Study Year, Campus, Faculty, Work Term, etc. in Waterloo University in the US.

To create nesting and combining groups in Tableau, follow the steps outlined below:

Step 1: Connect the Waterloo Enrolment 2024 dataset in Tableau using the File Navigator.

Example 3 - Step 1

Step 2: In the Data pane, right-click on the Program Grouping field. Choose Create – Group.

Example 3 - Step 2

Step 3: In the Create Group window, select the list of values for which you want to create a group and then click on Group. 

Tableau Group - Example 3 - Step 3

Step 4: Provide a name to the Group and click on OK. Here we have created a group of Maths by combining all the Maths-related programs.

Example 3 - Step 4

Step 5: Repeat the similar process in Steps 3 and 4 to create another group Health by combining the list of health-related programs.

Example 3 - Step 5

Step 6: Similarly, create a group Environment by combining the environment-related programs.

Example 3 - Step 6

Step 7: Now, let’s combine the newly created groups in Tableau to create another group. Here we have selected Environment, Health, and Maths groups to combine the dataset and create a new group.

Click on the Group button.

Tableau Group - Example 3 - Step 7

Tableau has created a combined group Health, Maths, and Environment by combining the 3 earlier created groups.

Tableau Group - Example 3 - Step 7 - group

Step 8: Now add the Geography related programs to this group. As you can see, Tableau has now combined all the members of previously created groups into a single group.

Tableau Group - Example 3 - Step 8

Important Things to Note

  • Tableau group creates a category that does not amend or change the raw data.
  • Groups can be created based on calculated fields, using sets, and nesting and combining groups.
  • You can use Tableau groups in data visualization, calculation, filters, and other areas.

Frequently Asked Questions (FAQs)

1. What is the difference between set and group in tableau?

The key differences between set and group in Tableau are outlined below:

FAQ 1

2. Are Tableau Groups dynamic?

No, Tableau groups are not dynamic. Once the groups are created, the group members remain static until they are edited or removed from the group.

3. Can I use Tableau Groups in conjunction with other Tableau features?

Yes, you can use Tableau groups in conjunction with other Tableau features. These include:

Apply filters to the data visualization based on the grouped data
Use the groups in calculations, marks cards, and reporting.
You can use the groups in Levels of Details (LOD) expressions

4. How do I delete a group in Tableau?

To delete a group in Tableau, follow the steps below:

Step 1: In the Data pane, select the group to be deleted. Right-click on the group and select Delete from the context menu.

FAQ 4

Step 2: Tableau will pop up a window for confirming the removal of the group.

FAQ 4 - Step 2

Step 3: Select Yes. Tableau will delete the group.

Download Template

This article must be helpful to understand the Tableau Group, with its formula and examples. You can download the template here to use it instantly.

This has been a guide to Tableau Group. Here we learn how to create a group based on calculated field, sets, nesting & combining with examples and points to remember. You can learn more from the following articles –

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *