How to Create an Org Chart Using Tableau Desktop
Updated: Feb 1
The following blog by Jacqui Moore was originally published on Do Mo(o)re With Data July 1, 2022 and is cross-posted here with permission. Jacqui Tableau Social Ambassador and a Senior Data Analytics and Viz Consultant for Cleartelligence.
This post describes the second of two methods for creating an Org Chart in Tableau. If you haven’t read the post where I give a short summary of the pros and cons of each method, you can find that here. If you would like to download the data, and follow along, you can download my files for follow along here.
In order to create an org chart (or any hierarchy chart or dendrogram) you will need to establish the relationship between each employee and every level of the hierarchy above them, as well as to their own direct reports.
To do this, using only Tableau Desktop, we will create a join for every relationship in the hierarchy. One for each level of management, all the way up to the CEO, and one for employees they directly manage.
We will start, as these things usually do, with data. You will need an employees table containing at least the employee’s name, and the name of their manager. Preferably, it will have IDs. It may also have other information about the employee. It will probably look something like this:

Let’s get started…
Data Prep
Below, I walk through how this can be done in Tableau Desktop. If you would like do the data prep in Tableau Prep, SQL, or Alteryx, I recommend using Method 1.
First, we will handle the supervisor hierarchy. This is done using a series of self-joins.
Connect to the employees table, and place it on the data canvas. For this, we don’t want to use Relationships Model, so double click the table to create the physical model.
We need two records for each employee. To do this, we will union the table with itself. Drag the table out again, and create the union.
Append “L1” to the [Manager] and [Manager ID] field by renaming the fields to [Manager L1] and [Manager ID L1]. It’s going to be important to clean up and rename fields as we go through this, so that it is clear when we go to build the dashboard.
Bring in the employees table again, and left join on [Manager ID L1] = [Employee ID]
Append L2 to the newly added [Manager] and [Manager ID] fields, and hide all other fields from the the second instance of the table. At this point, your data source will look like this:

Now, we will continue to do this until there are no additional levels of management. [Manager ID L2] = [Employee ID], [Manager ID L3] = [Employee ID], etc. You are done when the newly added [Manager] field is null for all employees.
If you are following along with the Rebel Alliance data set, your data source will look like this:

Next we will bring in subordinates. Join the table to itself again, this time on [Employee ID] = [Manager ID]
Rename [Employee ID] to [Subordinate ID], and [Employee] to [Subordinate], and hide all other fields from the newly added instance of the table.
Now your data source should look like this:
