3
Assignments
Medium
Skill Level
15 min
Duration
Free trainings
Subscribe to our Newsletter
Introduction
In this lesson, you will learn how to Groups and Hierarchies can use in Tableau Desktop to make complex datasets more easily complex datasets and make them easier to understand. Both are operations that you apply to your data after you load it.
In this lesson you will learn
- What hierarchies and groups are
- How to create hierarchies and groups
- What to use hierarchies and groups for

What are groups and hierarchies?
The term group is easy to understand, but it's good to think about it in more detail. When you create a group in Tableau, you create a subset of data from a specific field by combining individual values. In other words, you can combine multiple elements into one group based on a common attribute or property.
For example, you can create a group of all products that belong to a certain product line, come from the same manufacturer or supplier, or a group with products that have the same starting letter. You can make these groups a kind of upper level that represents all values, but also, for example, simply add together a group of products that you use often.
In Tableau, a "hierarchy" refers to an ordered structure of fields displayed in a layered order. It allows you to view and analyze data at different levels of detail, from broad to specific. A hierarchy is can be depicted as a tree structure, each new layer falling exclusively under an overarching category.
Using hierarchies, you can aggregate data at different levels, such as from year to quarter to month, from continent to country to city, or from product category to sub-category to product name. This helps analyze and visualize data in a more structured and understandable way.
After opening Tableau and the Sample - Superstore, you can see that two hierarchies have already been created in the Data Pane. These are the 'Product' hierarchy and the 'Location' hierarchy. For this exercise, we are going to look at the Product hierarchy. This hierarchy has already been created, by merging several dimensions and placing them in a certain order.
- Add the Location-hierarchy Add to Rows. You now see that you have a plus for the Country/Region field. Press the plus/minus to show or remove the fields. Is there some logic to the order of the fields? If so, which one?
- Right click on remove hierarchy. You will see that the plus/minus sign has disappeared from your fields on the rows.
- Add the Location-hierarchy again by selecting the corresponding fields and right-clicking on one of them. Select Hierarchy → Create Hierarchy and give 'Location' as the name.
- Place the spaces in the correct order, from large to small.
- You can also create a hierarchy by dragging a dimension onto another dimension. When doing this, consider whether it is a logical hierarchy.
- Right click on Manufacturer and choose Edit Group...
- You can see that under Field Name is the name of the group. Below that you will see the groups formed within the group manufacturer. This is also where you can add, delete or modify new groups.
- Click on some groups and see what this group is based on. This may have been done manually or by using the Find button and setting a condition.
If you want to know which field is used for the group, right-click Manufacturer again and click on Describe. Then under Remote column you will see that the Orders table was used and then the Product Name field.
We are merging Furniture & Office Supplies, the other group is Technology.
- Open a new sheet and rename the sheet to "Product Category Croups."
- Sleep Category to Rows. Drag Sub-Category to the right of it.
- Sleep Sales to Columns and sort Descending by clicking on the Sales axis.
- In the visualization, select Furniture and Office Supplies. Right-click on Group to create a group. Notice that the Category (group) has now appeared on the Row shelf. You can also find them in the data pane, if you want to change the group just right click on it and choose "Edit Group...".
- You can add Category (group) to the Product hierarchyby dragging it in.
Conclusion
In this lesson, you learned to work with hierarchies and groups. In the next lesson we will continue with advanced visualizations and return to the exercises we did in the previous lessons. You now possess a good basic to start with advanced visualizations and then also dashboards creating. The most fun part can start 🙂