top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Hierarchies, groups and sets in Tableau:

As we all know that Tableau is one of the great visualization tool. Using which we can analyze and visualize the data and to create a dashboard and story as per our need. Before creating a good viz., we involve in segregating or grouping the data. Hierarchies, groups and sets are some ways to group our data during visualizing. Depending on our requirement, we can choose one among these.


Let me consider one of the Tableau's default dataset "SuperStore" to create Hierarchies, groups and sets .


Hierarchies:

Did you ever noticed the plus sign in the Date pill? if you click that, it will expand to its next lower level like below..


This is called hierarchy. For date fields, the tableau automatically creates the hierarchy when we import the data into the Tableau. However, we can create our own hierarchy for the logically related dimensions as per our need. It can be done in 2 steps


Step:1 Select the pills(logically) by holding the control key in Windows users and command key in MaC users, then right click and select the Hierarchy -> Create Hierarchy as highlighted below



Step2: When I selected the "Create hierarchy", I got this pop up. I named my new hierarchy as "Products"













A new hierarchy called 'Products' got created. If we move this into the columns or rows shelf, it can be expanded or collapsed by clicking the +/-sign in the pill (similar to date field) . Also, did you noticed the hierarchy icon in front of the 'Products' pill in data pane?



















Remove a Hierarchy:


To remove a Hierarchy, right click the hierarchy field and select the "Remove Hierarchy" as shown






 

Groups:

Do you ever came across a scenario to merge 2 different items in a dimension into 1? If so, we can create them into a single group(merge them into a single line) on such cases. For example, if I want the rows  'Chairs & Chairmats' and 'Tables' from the sub-categories together, it can be grouped into a single line. Groups can be created in 2 different ways.


Method:1 Select the pills by holding the control key in Windows users and command key in MaC users, then right click on one pill and select the Group.

Now, these 2 got merged and a new group variable got created in the data pane, instead of overwriting the existing one(Product Sub-Category) as below. Don't forget to notice the group icon(paper clip symbol) in front of the variable.




 

Method:2 The other way is right clicking our pill in the data pane and creating a group. Select create - > Group.



A pop up window appears with entire list of Sub-Categories. I selected the same 2 items and clicked the Group button.



Now a new group got created. I renamed it as "Tables & Chairs". Then, I clicked 'OK' button. Now, it is appearing in the data pane.


















New group can be created irrespective of the 2 different methods. If you notice the Viz., it still shows the normal rows before merge. The reason is, the new group pill needs to be replaced into the shelf. I added the profits in the Text Mark to compare their values before grouping and after grouping.







If you notice the values in the grouped rows, they are adding up and giving the consolidated values.










 

Sets:

Sets are the custom field, that is a subset of an existing field based on certain condition. If we want to list the top 5 most profitable, Product Sub-categories, then we can create them into a set. The steps to create a set is shown below


Step:1

Right click the Product Sub-Category field and select the Create-> Set as highlighted below













Step:2

A pop up window will open for us to choose the options among the 3 tabs. Either we can manually select the sub-categories to create a set or based on some condition or top/Bottom list. In our scenario we need top 5 sub-categories for profits. So, after selecting the top 5 option and 'OK', a new Set field is created.


New Set field got created as shown below with the interconnected circles icon in front of the field name.




I dragged the new set field into the view. Now the Viz., looks like this with "In/Out of Product Sub-Category Set". The sub-categories under "In" falls inside the set, which means they are the top 5 Sub-categories. Whereas the sub-categories under "Out" falls outside the set, which means they are out of the top 5 Sub-categories.





Both the items that are "IN" the set and "OUT" the set are displayed in our Viz., If we want only the items that are "IN" the set, we can do that by right clicking the pill and selecting "Show Members in Set". Now only the top 5 items that are inside the set will be displayed.









Extended topic:

I just gave the introduction about Hierarchies, Groups and sets. However if we dig into each one, the topics extends to many sub topics. Their behavior when used with filters, combination of sets are some to mention. I will cover these extended topics in my upcoming blogs.


Conclusion:

Customized Hierarchies, Groups and sets in Tableau are very useful to analyze and visualize the data as per our requirements.


Reference:















42 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page