top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Building an Advanced Diabetes Risk Analytics Dashboard Using Power BI

Jun 3
6 min read



Every few seconds, someone somewhere in the world is diagnosed with diabetes. Many people don’t realize that they live with diabetes, which can eventually lead to serious health problems such as heart disease, kidney issues, and vision loss.


According to the International Diabetes Federation (IDF), around 589 million adults worldwide are currently living with diabetes, and the number is expected to increase in the coming years.


With the growing amount of healthcare data available today, data analytics and visualization play an important role in identifying patient risk patterns and supporting better healthcare decisions. This inspired me to build an Advanced Diabetes Risk Analytics Dashboard using Power BI.


The goal of this project was to analyze patient health indicators such as glucose level, HbA1c, blood pressure, BMI, cholesterol, and heart rate using interactive dashboards and advanced visualizations like Sankey Charts, Radar Charts, Heat Maps, and Decomposition Trees. In this blog, I will explain the complete process of building the dashboard and the insights generated from the healthcare dataset.


Dataset Overview


The dataset used in this project contains healthcare-related patient information that helps us to analyze the diabetes risk patterns and associated health conditions. The data includes important clinical and demographic attributes such as:

  • Patient ID

  • Age

  • Gender

  • Glucose Level

  • HbA1c

  • Blood Pressure

  • BMI

  • Cholesterol

  • Heart Rate

  • Diabetes Status


Since healthcare datasets often contain missing values, duplicate records, and inconsistent formatting, the data has to be preprocessed before visualization. I used Power Query in Power BI to clean and transform the dataset to make it suitable for analysis and to create a dashboard.


Data Cleaning and Transformation


Data cleaning was one of the most important steps in this project because the raw healthcare dataset has missing values, duplicate records, and inconsistent data formats. In fact, most of the work in data analytics is done by cleaning the data because clean and structured data makes analysis and creating insights much easier later.


Before building the dashboard, we have to use Power Query in Power BI to clean and prepare the data for analysis. At first, I thought building the dashboard would be the hardest part, but cleaning the healthcare data actually took much more time.


Some of the main preprocessing steps included:

  • Removing duplicate patient records

  • Handling missing and null values

  • Correcting data types

  • Creating calculated columns

  • Grouping patients into categories such as age range, BMI range, and blood pressure range


These transformations help us to improve the accuracy, performance, and readability of the dashboard. Proper data cleaning made it easier to build meaningful visualizations and generate better healthcare insights.


Dashboard Design and Visualization


After cleaning the data, the next step was creating the dashboard in a way that makes the analysis simpler, interactive, and meaningful. Instead of placing all visuals on a single page, we can organize the dashboard into different analytical sections to improve readability and better understanding.


The dashboard was divided into the following categories:

  • Diabetes and Metabolic Health Analysis

  • Cardiovascular and Clinical Risk Assessment

  • Cognitive and Neurological Risk Analysis

  • Demographic and Population Health Insights


KPI cards, slicers, filters, and interactive charts are used to help users explore the data more effectively. One of the main goals for creating a dashboard is not only to display data but also to tell a story through visualization.


To make the dashboard more interactive and easier to understand, I used advanced custom visuals such as Sankey Charts, Radar Charts, Heat Maps, and Decomposition Trees along with regular Power BI visuals. These advanced charts made healthcare patterns much easier to understand than traditional visuals.



This dashboard made it easier to understand patient health patterns using interactive visualizations.
This dashboard made it easier to understand patient health patterns using interactive visualizations.

Advanced Charts and Custom Visuals


One of the most interesting parts of this project was working with advanced Power BI visuals. Power BI provides many built-in charts, but some advanced visuals, such as Sankey Charts and Radar Charts, are not available by default. To use these visuals, we have to download custom chart files from Microsoft AppSource and import them into Power BI.


Steps to Import Custom Visuals

1.    Download the required visual from Microsoft AppSource

2.    Save the visual file in .pbiviz format

3.    Next, to import Open Power BI Desktop

4.    In the Visualizations pane, click the three dots (...)

5.    Select “Import a visual from a file.”

6.    Choose the downloaded .pbiviz file

7.    The visual will be added to the Visualizations panel

Now we can use advanced charts in our dashboard to make the analysis more interactive and meaningful.


  • Sankey Charts were used to show relationships and flow patterns between diabetes, hypertension, and other patient risk conditions.


This Sankey chart shows how BMI categories are connected to different diabetes severity levels among patients.
This Sankey chart shows how BMI categories are connected to different diabetes severity levels among patients.

  • The Radar Chart made it easier to compare multiple health indicators such as glucose, BMI, blood pressure, cholesterol, and heart rate within a single visual.

  • Heat Maps were used for identifying high-risk patient patterns using color intensity.

  • The Decomposition Tree Chart helps us to break down and analyze the factors behind higher diabetes risk among patients.


Creating a Radar Chart Using DAX Measures


The Radar Chart was one of the most useful visuals because it allowed me to compare multiple health indicators in a single view. Initially, I struggled while comparing healthcare indicators because each metric had a completely different scale. We use DAX measures to normalize the values before adding them to the chart and making them easier to compare.


For this radar chart, I used key indicators such as glucose, HbA1c, BMI, SBP, DBP, cholesterol, and heart rate.

DAX measures:

Avg Glucose = AVERAGE('Cleaned Consolidated'[GLUCOSE mg/dL])
           Avg HbA1c = AVERAGE('Cleaned Consolidated'[Hb A1C%])
           Avg BMI = AVERAGEX('Cleaned Consolidated',
          IFERROR(VALUE('Cleaned Consolidated'[New BMI]), BLANK()))
          Avg SBP = AVERAGE('Cleaned Consolidated'[24Hour-Daytime-SBP])
          Avg DBP = AVERAGE('Cleaned Consolidated'[24Hour-Daytime-DBP])
          Avg Cholesterol = AVERAGE('Cleaned Consolidated'[CHOLESTmg/dL])
          Avg HR = AVERAGE('Cleaned Consolidated'[24Hour-Daytime-HR])

*‘Cleaned Consolidated’ is the table name of the cleaned dataset


Create a Category Table

         Go to Home → Enter Data and create a table name “Risk Factors”:

Risk Factor

         Glucose        

HbA1c

         BMI

         SBP

         DBP

         Cholesterol

         Heart Rate

         *Column name → Risk Factor

         * Table name → Risk Factors






Create a new measure for the Radar value

Radar Value = SWITCH( SELECTEDVALUE('Risk Factors'[Risk Factor]),
    "Glucose", [Avg Glucose],
    "BMI", [Avg BMI],
    "SBP", [Avg SBP],
    "DBP", [Avg DBP],
    "Cholesterol", [Avg Cholesterol],
    "Heart Rate", [Avg Heart Rate],
    "HbA1c", [Avg HbA1c])

Add Fields to Radar Chart


Open the radar chart from the build pane and add the column name Risk Factor under the category field and Radar value under the Y Axis.

Category → Risk Factor

Y Axis → Radar value



This visualization allowed us to quickly compare important health factors related to diabetes
This visualization allowed us to quickly compare important health factors related to diabetes

Key Insights from the Dashboard


After analyzing this healthcare data, one thing I noticed during the analysis was that patients with higher BMI and blood pressure levels often showed stronger diabetes risk patterns. I also noticed that glucose and HbA1c values were generally higher and more common among older patients. We could find more meaningful patterns through the dashboard.


The dashboard also helped highlight the connection between diabetes and cardiovascular health factors such as heart rate and blood pressure. Using interactive charts and filters made it easier to compare different patient groups and identify high-risk patterns from the healthcare data.


Challenges Faced During the Project


One of the biggest challenges in this project was working with a large healthcare dataset that has many columns, many different categories, and patient records. I actually spent more time cleaning the data than building the visuals because the dataset contained many categories and inconsistent values.


I also faced some challenges while choosing the right visualizations for the analysis. Since advanced charts like Sankey Charts and Radar Charts are not built into Power BI by default, I had to download and import them separately. Another challenge was comparing different healthcare indicators because each metric had a different scale and range.


Even though the process was challenging and time-consuming, it helped me gain better experience and improve my skills in data cleaning, DAX calculations, advanced visualizations, and dashboard design using Power BI.


Tools Used

  • Power BI

  • Power Query

  • DAX

  • Microsoft AppSource Custom Visuals

 

Conclusion


Building this dashboard helped me understand how healthcare data can be transformed into meaningful insights using Power BI. From data cleaning to advanced visualizations and DAX calculations, every step improved my analytical and dashboard development skills.


This project also showed how interactive dashboards can simplify complex healthcare data and help identify patient risk patterns more effectively.

 
 

+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