How to Create a Dendrogram in Tableau - My Way

 



A dendrogram, also known as a phylogenetic tree, shows the evolutionary interrelations of a group of organisms derived from a common ancestral form. The ancestor is in the tree “trunk”; organisms that have arisen from it are placed at the ends of tree “branches.” The distance of one group from the other groups indicates the degree of relationship; i.e., closely related groups are located on branches close to one another. Phylogenetic trees, although speculative, provide a convenient method for studying phylogenetic relationships.

A dendrogram can be generated by coding using libraries like scipy, Matlab, and plotly. However, how do you create one on Tableau? Using an image of a dendrogram from Matlab, I will demonstrate how.


Step 1: Draw the Dendrogram Using Any Software or Pen and Paper (image from Matlab)

Step 2: Mark the Lines for Each to Look Like a Full Bar Chart

Step 3: Label the Rows with Numbers

Step 4: Label Columns with Numbers

Step 5: Enter the Numbers into an Excel

  • Layer is to determine which bar is at the front to ensure the shorter ones can be seen (sort in order in Excel for convenience)
  • Place is the row numbers where each bar starts
  • Size is the difference between row numbers. For example, in the image, a bar starts at point 2 and ends at point, 6 the size will be 4
  • Height is the column numbers


Step 6: Import the File into Tableau and Place Pills in the Continous Dimension
  • Place in Columns
  • Height in Rows
  • Size in Size


Step 7: Set Marks of Colour
  • Choose a colour to be the same as the background (in my case white)
  • Choose a border colour to contrast



Step 8: Set Size



Step 9: Publish Your Dendrogram!