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

How to create a Dendrogram Chart in Tableau



When I was trying to explore some new charts, I came up with this captivating and apprehensible Dendrogram Chart. Here I am going to create a Dendrogram chart with a combination of Bar chart.

What is a Dendrogram Chart?

A dendrogram chart is a diagram that shows the hierarchical relationship between objects. It is also called a tree diagram.

We are going to use Sample Superstore data to create a Dendrogram chart in Tableau .

Let us begin to visualize sub-category-wise sales using a Dendrogram chart.

Step 1 :

Load the Sample Superstore data into Tableau and create Union for orders

Step 2 :

Calculated Field:

We need to create some calculated fields to get the Dendrogram Chart

Path: To create a Dendrogram chart we need two points, the start point, and the endpoint. Here 0 and 200 are the start and the endpoints respectively.


Path(bin): This helps to create evenly spread data points between the start and end points (i.e 0 and 200). Create a path bin and edit the size of bins as 1.


Sales_Calc:


Total_Sales_Calc:


Sales_Percentage:


Percentage_Adjusted:

X:We need X and Y points to draw the lines

X:

Y:


Rank: Helps to create different lines for different subcategories.


Sigmoid: To create curves


Size:


Step 3 :

Plotting the Graph

Drag and drop X to Column and both Y and Path(bin) to Row. In path(bin) make sure the ‘show missing value’ is selected.

Change the marks to the line and move the path(bin) from Row to path in the marks and put Sub-category in color.


Edit Table Calculation to get the proper shape of the Dendrogram Chart

For X

  • Right-click on X in the Rows and select compute using Path(bin)

For Y

  • Right-click on Y in the Columns and select compute using Path(bin)

  • Again Right click on Y and select Edit Table Calculation

In Nested Calculations

For Y: Select Sub-Category and deselect Path(bin)

For Rank: Select Sub-Category and deselect Path(bin)

The chart will look like the one below

Step 4:

To include bar chart in the Dendrogram chart we need to drag and drop the calculated field ‘size’ in size under Marks

· Right-click on Size and select Compute using Path(Bins)

· Again Right click on Y and select Edit Table Calculation

In Nested Calculations

For Percentage Adjusted: Select both Path(Bin) and Sub-Category

For Total Sales: Select both Path(Bin) and Sub-Category

Now the chart will look like this


Step 5:

Formatting the Chart for better Visualization

Drag and drop Sub-category and Sales_Percentage in Label under Marks

Edit Label

· Right-click on the label under marks and in Label Appearance edit the Text.

· Right-click on the Sales_Percentage under marks, click format and choose Percentage to get the display of percentage value in the chart.

Right click on the X and Y axis and deselect the Show header to remove the header in the chart.



This is the final outcome of the Dendrogram chart with bar chart for Sub-Category wise Sales Percentage. We can even use a simple bar chart to get the visualization for the above requirements but I always prefer to try new charts. Hope this blog will be helpful to create Dendrogram Chart. Thanks for reading!!!!!

2,578 views1 comment

Recent Posts

See All

1 commentaire

Noté 0 étoile sur 5.
Pas encore de note

Ajouter une note
Invité
06 avr. 2023
Noté 3 étoiles sur 5.

Would have been nice if this actually worked. I ended up with Path values that are always zero, so the path bin does not have the range that is shown in the steps above. The steps are also not in order with regard to creating the equations, which requires the user to bounce around. The graphics are cropped, so you can't see the actual Tableau page to check anything. Will have to look elsewhere to perform the exercise.

J'aime
bottom of page