Diwali Deal : Flat 20% off + 2 free self-paced courses + Free Ebook + $200 Voucher  - SCHEDULE CALL

- Tableau Blogs -

A Complete Guide to Hierarchy in Tableau

Introduction

In this article, we are going to talk about the Hierarchies in tableau. The hierarchy in the tableau can be very helpful while creating the tabular report. We will also see what the default hierarchies have available in tableau and how to create a new hierarchy. We will also see how to use that hierarchy in the report.

What is a Hierarchy in Tableau?

The hierarchy in Tableau is like a database model where the data is organized in the tree-like structure. At the backend, the whole data will be stored like in individual records which will be connected through each other using links.

You might have found in a tableau that whenever you use any date dimension, it gets converted automatically into some tree-based structure. For example, if you will use the order date from the sample superstore data set into the report view then you will find year by default getting displayed. Although, in order date dimension we have individual dates when the order has been placed. But when we use that field into the report view, the default view that we see in the year of the order date and not the individual date.

So, that creates something like hierarchy. Further, when you click on that year, you will see month then date and so on.

creates hierarchy in tableau

The plus icon that you are saying with the order date says there are more items in this hierarchy. If you will further click on that plus icon you will find that year along with the quarter. Now if you will further click on the plus icon along with the quarter, you will find now three dimensions being displayed there-year, quarter, and month. If you will further click on the plus icon with the month, you will find the day displayed over there. And the view will look like below -

Now as you can see, we don't have any plus icon with any of the dimensions. That's because we don't have any further drill down to this order date dimension. But now we can see some minus icons with year, quarter, and month. If you click on those minus icons, those will be taken in getting into the default view.

So, depending upon the view you are looking for in the report you can play around the hierarchy. This is the default hierarchy that I will create based on the data given. If required we can also create our own hierarchy to be used in the report.

Read: Tableau Server Certification Associate Preparation Guide

Why do we need Hierarchies in tableau?

There may be multiple requirements when we need to use hierarchies in tableau report to make the report simpler and meaningful. For example, let’s create a report for a different group of users. These groups may be having individual members, project leads, managers, directors and so on.

We have this report for employee-related information. So, when a director will see the report, they might not be interested to see the demographic details of the employee. While when the manager will see the report, they might be interested to see the demographic related details of the employee as well.

As we have to create a single report for all these different groups of users and so show the report should be in a way to address all sets of users. Whenever we have these kinds of requirements hierarchies in the tableau can be very helpful. Here what we can do is, we can create a hierarchy for the demographic details which can contain the name of the customer, city, state, and other details. By default, we can simply show the name of the customer and if the viewers want, they can further click on the plus icon and see for the details of customer. In next section, we are going to see how we can create our own hierarchy in tableau.

How to create a hierarchy in tableau?

To create a hierarchy in tableau, follow the below steps-

  • Right-click on the dimension and select hierarchy followed by creating a hierarchy
  • You will get a pop-up option that will ask you to provide the name of the hierarchy.  You can make any name as per your choice that name won't be visible to the user. In our case, I have given the name of the hierarchy as a demographic hierarchy.

  • You will find in the dimension section a new field has been created with the name of the hierarchy that you have given and there will be a member of the hierarchy that member will be the dimension name on which you right-clicked and created the hierarchy.

You can also see a tree-like icon along with a variety that denotes that this is a hierarchy and there will be multiple members around it.

Now we need to add a few more dimensions in this hierarchy. The dimensions that we are going to add in this hierarchy are - City, state, and country. Add a new dimension to the created hierarchy, right-click on the dimension select hierarchy, add to hierarchy, and then select the name of the hierarchy in which you want to add that dimension.

You may also drag that dimension and simply put that into the hierarchy field. Both the steps work for a similar purpose. Once you will add city, state, and country, to the demographic hierarchy, your hierarchy will look like below -

Read: A Complete Guide On Dual Axis

As you can see, we have four members in the demographic hierarchy. As per the property of the hierarchy, the first member of the hierarchy will be shown in the default view. And when the user will click on the plus icon of the first member of the hierarchy the 2nd dimension of the hierarchy will get open. Similarly, when the user will click on the plus icon of the second member of the hierarchy, the third member of the hierarchy will get open. And this process will continue until the last member of the hierarchy will be reached. Once, the last member of the hierarchy will be reached, no more plus icon will be there. But you will find the minus icons with the earlier members of the hierarchy. This way you can create a tabular report with hierarchy.

In the next section, we are going to use the demographic hierarchy that we have just now created into the tabular report.

Tableau Online Training & Certification

  • No cost for a Demo Class
  • Industry Expert as your Trainer
  • Available as per your schedule
  • Customer Support Available

How to use the Tableau Hierarchy in the report?

We have already created the hierarchy with the name demographic hierarchy and now we are going to use that hierarchy into the tabular report. To use demographic hierarchy, just drag that into the row shelf. Whenever we create a tabular report, mostly we put us dimensions and measures into the row shelf.

Now let's say, we need to show how much sales we have made from each customer. So, we will drag the sum of sales into the row shelf and convert the continuous value of the sales into the discrete value.

Now we have the tabular report with the hierarchy and sales created. As you can see the default view of the demographic hierarchy is the customer name. That's just because we have put customer names in the first place in the hierarchy. Also, the plus icon is being shown with the customer name. So, if you click on the Plus icon, the name of the city will be shown to you also along with the plus icon. Further clicking on the plus icon with the city you will see state names. If you will further click on the plus icon of the state names, the country names will be also shown to you. Now as we don't have any further element of the hierarchy after country, so no longer plus icon will be shown to you. And the view will look like below-

Read: Top 100 Tableau Interview Questions And Answers In 2023(Updated)

That's how we use hierarchy into the tabular report!

Now depending upon the view, you want the user to default see keep that view and publish the report to the tableau server. That will be the default view any user will be able to see. Further, if the user wants, they can collapse the view or see the detailed view.

It's not always necessary to create only the tabular report with hierarchy. You may create any kind of report and use the hierarchies in that report. It will work in a similar way.

Tableau Online Training & Certification

  • Personalized Free Consultation
  • Access to Our Learning Management System
  • Access to Our Course Curriculum
  • Be a Part of Our Free Demo Class

Wrapping it up!

This was all about the hierarchy in tableau. We discuss what is a hierarchy, why you should create a hierarchy, how to create a hierarchy, and used a hierarchy in the report. This helps us to make a tabular report better and do our work efficiently.

You can also create a hierarchy for your own requirements and then use the same hierarchy to your reporting needs. Also, if you face any difficulty while creating this, you can comment here.

Read: 6 Steps On How to Build an Impressive Tableau Developer Resumes (With Samples)


fbicons FaceBook twitterTwitter lingedinLinkedIn pinterest Pinterest emailEmail

     Logo

    JanBask Training

    A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.


  • fb-15
  • twitter-15
  • linkedin-15

Comments

Trending Courses

Cyber Security Course

Cyber Security

  • Introduction to cybersecurity
  • Cryptography and Secure Communication 
  • Cloud Computing Architectural Framework
  • Security Architectures and Models
Cyber Security Course

Upcoming Class

4 days 22 Nov 2024

QA Course

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing
QA Course

Upcoming Class

14 days 02 Dec 2024

Salesforce Course

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL
Salesforce Course

Upcoming Class

2 days 20 Nov 2024

Business Analyst Course

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum
Business Analyst Course

Upcoming Class

5 days 23 Nov 2024

MS SQL Server Course

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design
MS SQL Server Course

Upcoming Class

5 days 23 Nov 2024

Data Science Course

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning
Data Science Course

Upcoming Class

4 days 22 Nov 2024

DevOps Course

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing
DevOps Course

Upcoming Class

-0 day 18 Nov 2024

Hadoop Course

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation
Hadoop Course

Upcoming Class

4 days 22 Nov 2024

Python Course

Python

  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation
Python Course

Upcoming Class

12 days 30 Nov 2024

Artificial Intelligence Course

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks
Artificial Intelligence Course

Upcoming Class

5 days 23 Nov 2024

Machine Learning Course

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning
Machine Learning Course

Upcoming Class

39 days 27 Dec 2024

 Tableau Course

Tableau

  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop
 Tableau Course

Upcoming Class

4 days 22 Nov 2024

Search Posts

Reset

Receive Latest Materials and Offers on Tableau Course

Interviews