Hierarchies allow us to organize the dimensions in our data. In order that we define, from highest level at the top, to the lowest level at the bottom. For instance, a common hierarchical structure is geographic data. Starting at the highest level we have country, followed by state , then city , and finally postal code. These fields in our data are all related. You can see here in the data pane. The geographical fields are clearly organized from the highest level to lowest level.

Let’s see how we can create hiearachies in Tableau? Hierarchies are created from the dimensions in the data pane. You start by selecting one or more fields. Then right click the selected fields. For example lets select category and subcategory. Then select hierarchy, and click create hierarchy. In the pop-up windows, type the name, then click ok. The new hierarchy now appears as a dimension in the data pane. Here the example :

Do you realize that small “hierarchy symbol” appeaed next the All Products. The members are listed alphabetical order.

Another way to create hierarchy is by dragging and dropping. You can just drag one dimension onto teh other. For exapmle, lets drag Customer Name onto Customer ID. In the Pop Up window, give it a name. Then click OK. Now this hierarchy appears in the dimension pane. Look at image below:

Once the hierarchy has been created, you can add more dimensions by right-clicking the additional dimension. And select hierarchy, then select add to hierarchy and choose the hierarchy you would like to modify. Or you can just drag and drop a dimension into a hierarchy. In this example we can add customer location then customer segment.

No matter how you create your hierarchy, you can always reaarenge the order of the dimensions within the hirrarchy. By clicking and dragging the member and moving it up and down the list. In addition You can also move members between the hierarchies by dragging and dropping.

Hieararchies is great while we are working on a lot of dimensions. You can easily create a hierarchy, so you can find and use your dimension immediately. In this article we have learned the importance of hierarchies and how to create a hierarchy. Please don’t remember to share this article.

Leave a Reply