Recently, I completed a rewarding Power BI project that transformed raw Retail Chemist Prescription Audit (RCPA) data into a dynamic, interactive dashboard. The challenge wasnโt just about visualizing metricsโit was about cleaning messy data, modeling relationships, crafting insightful DAX measures, and ultimately telling a story that stakeholders could act on.
In this article, Iโll walk you through how I approached the project from start to finish, covering:
- ๐ ETL in Power Query
- ๐ง Data modeling and relationships
- ๐ Key DAX measures
- ๐จ Designing visuals for business insights
๐๏ธ Project Overview
Goal: Build a Power BI dashboard to analyze prescription performance by doctor, brand, region, and medical repโwhile uncovering trends in doctor conversion and brand competition.
Key Objectives:
- Clean and transform raw RCPA data
- Build a structured data model with meaningful relationships
- Generate actionable visuals using DAX and Power BI
- Empower business users to track brand performance and doctor behavior
๐ฆ Dataset Summary
The project was powered by four core tables:
| Table Name | Description |
|---|---|
| RCPA Reporting Form | Raw data on doctor prescriptions |
| Product Master | Metadata on products and brands |
| Brand Targets | Expected prescription targets |
| Expected Transformation Sheet | Guide for cleaning and structuring the data |
๐งผ Step 1: ETL with Power Query
Using Power Query Editor, I transformed the raw inputs into analytics-ready tables.
๐น Cleaning Tasks
- Removed duplicates and missing values
- Converted currency strings (e.g.,
"KSh 1,000") to numeric format - Standardized column names and data types
๐น Transformation Tasks
- Merged
Product MasterwithRCPA Reporting Formto enrich product info - Created
RCPA Data Tablewith key metrics (Brand, Doctor, Med Rep) - Built
Competitor RCPA Data Tablefor comparative analysis - Aggregated prescription counts and values for performance tracking
This step laid the foundation for a reliable data model and meaningful visuals.
๐ง Step 2: Building the Data Model
I designed a star schema to ensure clarity and performance.
๐ธ Fact Tables
-
RCPA Data -
Competitor RCPA Data
๐ธ Dimension Tables
-
Product Master -
Brand Targets
๐ Relationships Created
-
Product Master โ RCPA Data(based on product/brand) -
Brand Targets โ RCPA Data(to compare actual vs. target Rx) -
Product Master โ Competitor RCPA Data(for brand competition)
All relationships were tested and configured with correct cardinality and filter directions to ensure accurate cross-filtering.
๐ Step 3: Visualizing Insights
With the model in place, I designed a clean, interactive dashboard that delivered real business value.
๐ฏ Key Visuals
-
Doctor Prescription Performance
- Bar/column charts showing Rx volume per doctor vs. brand targets
- Filterable by region and medical rep
-
Doctor Conversion Status
- DAX logic to identify doctors meeting/exceeding targets for 3+ consecutive RCPA periods
- Displayed with icons and color-coded status indicators
-
Brand Competition Analysis
- Stacked column charts comparing our brandโs performance against competitors
- Segmented by region and product category
๐ก Final Thoughts
This project was more than a dashboardโit was a strategic tool that helped stakeholders understand prescription dynamics, identify high-performing doctors, and assess brand competitiveness. Power BIโs flexibility, combined with thoughtful data modeling and DAX, made it possible to turn raw RCPA data into actionable insights.
Top comments (0)