top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Dendrogram Chart In Tableau

Updated: Sep 2

A dendrogram is a graph that shows the hierarchical view of data. With multiple levels it may look like a tree, so often referred as a tree diagram.

Dendrograms are commonly used for hierarchical clustering, but they’re also a handy choice if you need to show the data structure in a dashboard.


Creating a Dendrogram Chart in Tableau to Visualize SIRS Patient Clusters

When analyzing healthcare data, specifically critical care data, very often we wanted to understand the hierarchies and clusters among all patients. One of the creative ways to do this in Tableau is by building a Dendrogram Chart. Now that Tableau doesn’t have a built-in dendrogram, we can build one using a combination of calculated fields and sigmoid curves to create a tree-like visualization to show how patients’ group together.

This blog demonstrates how to create a dendrogram using SIRS (Systemic Inflammatory Response Syndrome) data and shows how clusters of patients can be visually represented.

When to use a Dendrogram?

An illustration of hierarchical relationships that resembles a tree like structure is called a dendrogram.

A dendrogram can also be applied in healthcare analytics to:

  • Categorize patients based on conditions or symptoms.

  • Trace the progression of severity (example: starting with SIRS to Sepsis).

  • Highlight groups of patient responses for various vital signs.

 

Instead of just looking at numbers, dendrograms let clinicians and analysts see patterns of similarity in the data.

To create a dendrogram chart in tableau, we need to prepare our data by creating path bins and using calculated fields to determine coordinates and structure for levels


Step 1: Getting Data Ready

For example, we will be looking at patients who meet SIRS criteria (calculated based on HR, Temp, Respiratory and WBC abnormalities). Our dataset contains patient vitals and lab values, along with a calculated field for SIRS Count that shows us how many of the SIRS criteria each patient meets.


Step 2: Important Formulas in Calculated Fields

1. X-axis

(INDEX()-1)*0.12-6

This defines that nodes are spaced out horizontally even along the chart.

2. Sigmoid

1/(1+EXP(-[@X]))

This makes sure that the curve look like letter “S” in shape which is used to connect the branches.

3. Y-axis

[@Sigmoid]*([@Rank] - (WINDOW_MAX([@Rank])+1)/2)/100

This makes sure that nodes are spaced out horizontally even along the chart based on the @Rank.

4. Rank

RANK_UNIQUE([@SIRS_Count_P],'desc')

It makes sure that each branch is uniquely ordered by patient count.

5. Patient Count•

  • Distinct patients meeting SIRS:COUNTD(IF ([SIRS Count]>=2) THEN [Patient ID] END)

  • Cluster totals: WINDOW_SUM([@SIRS_Distinct_Patients])/2

  • Percentages:[@SIRS_Count_P]/[@Total_SIRS]

  • Percentage Adjusted:[@Percentage]/WINDOW_MAX([@Percentage])

6. Size

IF [@X]>=6 and [@X]<=6+(10*[@Percentage_Adjusted])

THEN 1 ELSE 0 END

Determines branch length relative to patient share.


Step 3: Create the Chart

1.      Place X on Columns and Y on Rows.

2.      Next, change Marks Type → Line.

3.      Keep Index or Rank or Path to connect the curves.

4.      Drag Age Category into Color.

5.      Also Drag needed labels for clarity.


Step 4: Healthcare Example (SIRS)

In this Sepsis dataset SIRS analysis on Age Distribution:

·       Each branch in the dendrogram diagram represents SIRS Patient count and age group.

·       The longer the branch represents the patient counts.

·       The curved (sigmoid) paths show how groups diverge from one another.


SIRS Age Distribution By Patient Count
SIRS Age Distribution By Patient Count

Advantages & Disadvantages of Tableau Dendrogram chart:

Advantages:

·       Gives a attractive visualization like a tree with clusters.

·       Helps to explain patient grouping to clinicians in a visual way to understand.

·       Flexible and it can be applied to SIRS, Sepsis, or any clustering problem.

Disadvantages:

·       Requires special formulas using Calculated Fields, so simple drag-and-drop doesn’t work.

·       For Large or messy data, the Chart could be confusing.

·       It works better for summary clusters, not for every single patient detail.


Use case Examples In Different Industries:

·       In Healthcare to group patients by severity, age, and treatment to spot high-risk groups.

·       In Marketing to group customers by spending, frequency, and preferences for targeted campaigns.

·       In Retail to categorize products by category, price, and sales channel to optimize inventory.

·       While in Finance to group stocks by sector, volatility, and performance for better portfolio management.

·       And in Education system to group students by scores, attendance, and learning style to personalize interventions.

Want To Go Deeper?

Multi-level dendrograms in Tableau can be built by adding subcategory branching layers, interactive filters, and refined visuals It allows to create subgroups within each branch like subdividing each branch into additional categories (e.g., age group, gender or treatment type)

If you want to learn more about multilevel dendrogram, you can use the website: https://medium.com/@angela_kokhtenko/multi-level-dendrogram-in-tableau-9918b675ee60


Conclusion:

            Dendrogram charts in Tableau are a creative way to visualize the hierarchical clustering in healthcare data. By using calculated fields, curve lines(sigmoid functions),ranking and patient counts, we can turn a simple data into a tree-like structure.

In this case of SIRS analysis, the above visualization helps us show how patients group together by age and condition which makes it easier for Clinicians and analysts to spot trends that might not be in raw numbers.

             Overall, dendrograms are a powerful way to turn detailed healthcare data into meaningful representation, supporting better insights and decision-making in ICU analytics.

 
 

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page