![](https://static.wixstatic.com/media/543cd2_0d92984235e04749b6bbc9386b30be06~mv2.png/v1/fill/w_753,h_698,al_c,q_90,enc_auto/543cd2_0d92984235e04749b6bbc9386b30be06~mv2.png)
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
![](https://static.wixstatic.com/media/543cd2_9bf1e6593eaf4af5a0c2ade71ed42a34~mv2.png/v1/fill/w_469,h_294,al_c,q_85,enc_auto/543cd2_9bf1e6593eaf4af5a0c2ade71ed42a34~mv2.png)
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.
![](https://static.wixstatic.com/media/543cd2_983c4efcfb624863827a4f43e5d1af8a~mv2.png/v1/fill/w_410,h_142,al_c,q_85,enc_auto/543cd2_983c4efcfb624863827a4f43e5d1af8a~mv2.png)
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.
![](https://static.wixstatic.com/media/543cd2_a5bc311e68c141b6b97755a82c21f889~mv2.png/v1/fill/w_465,h_272,al_c,q_85,enc_auto/543cd2_a5bc311e68c141b6b97755a82c21f889~mv2.png)
Sales_Calc:
![](https://static.wixstatic.com/media/543cd2_b47008bf667d40889450ca1aa070fa7d~mv2.png/v1/fill/w_486,h_117,al_c,q_85,enc_auto/543cd2_b47008bf667d40889450ca1aa070fa7d~mv2.png)
Total_Sales_Calc:
![](https://static.wixstatic.com/media/543cd2_ebc0b1929f2e4b2ab9d9f91d217bc8af~mv2.png/v1/fill/w_466,h_144,al_c,q_85,enc_auto/543cd2_ebc0b1929f2e4b2ab9d9f91d217bc8af~mv2.png)
Sales_Percentage:
![](https://static.wixstatic.com/media/543cd2_780a88beab3644c09a375c4f6ecf9416~mv2.png/v1/fill/w_450,h_137,al_c,q_85,enc_auto/543cd2_780a88beab3644c09a375c4f6ecf9416~mv2.png)
Percentage_Adjusted:
![](https://static.wixstatic.com/media/543cd2_14e266f2c3c34c5ba694bb2368daae83~mv2.png/v1/fill/w_586,h_135,al_c,q_85,enc_auto/543cd2_14e266f2c3c34c5ba694bb2368daae83~mv2.png)
X:We need X and Y points to draw the lines
X:
![](https://static.wixstatic.com/media/543cd2_95dc97b171f24e6f9607019bcb8eeb0f~mv2.png/v1/fill/w_281,h_127,al_c,q_85,enc_auto/543cd2_95dc97b171f24e6f9607019bcb8eeb0f~mv2.png)
Y:
![](https://static.wixstatic.com/media/543cd2_e952f0fc3071498d9e00f2ad45bc572e~mv2.png/v1/fill/w_560,h_147,al_c,q_85,enc_auto/543cd2_e952f0fc3071498d9e00f2ad45bc572e~mv2.png)
Rank: Helps to create different lines for different subcategories.
![](https://static.wixstatic.com/media/543cd2_3f1cc28c9db744e5a8c67d7f06e17342~mv2.png/v1/fill/w_472,h_146,al_c,q_85,enc_auto/543cd2_3f1cc28c9db744e5a8c67d7f06e17342~mv2.png)
Sigmoid: To create curves
![](https://static.wixstatic.com/media/543cd2_9a631881aa53491a8de32c36aa74754f~mv2.png/v1/fill/w_357,h_127,al_c,q_85,enc_auto/543cd2_9a631881aa53491a8de32c36aa74754f~mv2.png)
Size:
![](https://static.wixstatic.com/media/543cd2_a347f5e3e07749c98e546683eb54c61f~mv2.png/v1/fill/w_509,h_193,al_c,q_85,enc_auto/543cd2_a347f5e3e07749c98e546683eb54c61f~mv2.png)
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.
![](https://static.wixstatic.com/media/543cd2_51cd309c2d9c446b8ecaee13ea59de77~mv2.png/v1/fill/w_509,h_193,al_c,q_85,enc_auto/543cd2_51cd309c2d9c446b8ecaee13ea59de77~mv2.png)
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
![](https://static.wixstatic.com/media/543cd2_e25e8c964a1d4486a9d5c3e577536f42~mv2.png/v1/fill/w_754,h_704,al_c,q_90,enc_auto/543cd2_e25e8c964a1d4486a9d5c3e577536f42~mv2.png)
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
![](https://static.wixstatic.com/media/543cd2_e655bc5079364ba0b4f756ba35adfb5b~mv2.png/v1/fill/w_753,h_698,al_c,q_90,enc_auto/543cd2_e655bc5079364ba0b4f756ba35adfb5b~mv2.png)
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.
![](https://static.wixstatic.com/media/543cd2_6e15d6b74aae4983a26b673df616a557~mv2.png/v1/fill/w_822,h_663,al_c,q_90,enc_auto/543cd2_6e15d6b74aae4983a26b673df616a557~mv2.png)
Right click on the X and Y axis and deselect the Show header to remove the header in the chart.
![](https://static.wixstatic.com/media/543cd2_0172f8695253447b8ac60aea7d84d49a~mv2.png/v1/fill/w_809,h_733,al_c,q_90,enc_auto/543cd2_0172f8695253447b8ac60aea7d84d49a~mv2.png)
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!!!!!
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.