This project explores online retail transaction data using a mix of SQL for data cleaning and exploration and Power BI for creating an interactive, insightful dashboard.
Here's how everything is organized:
Online_Retail_Analysis/
│
├── README.md
├── DATA/
│ ├── online_retail
│ └── online_retail_clean.csv # cleaned data for analysis
│
├── Power BI/
│ └── Dashboard_OnlineRetail.pbix
│ └── Power BI report preview.pdf
│
├── SQL/
│ └── create_table.sql
│ └── data_cleaning.sql
│ └── data_querying.sql
|
The dataset contains ~540K transaction records from a UK-based online retailer (2010–2011). It includes:
- Customer info (
CustomerID
,Country
) - Product info (
StockCode
,Description
) - Transaction info (
InvoiceNo
,Quantity
,UnitPrice
,InvoiceDate
)
Before jumping into Power BI, I used SQL to clean and prep the data:
- Replaced missing
CustomerID
with'0'
(represents guest customers) - Removed invalid entries (
Quantity <= 0
,UnitPrice <= 0
) - De-duplicated records using
GROUP BY
- Trimmed product descriptions and made them lowercase
I also ran several queries to get a sense of what was going on in the data:
- Total revenue per customer
- Customers with only one order
- Top countries by number of customers
- Most purchased products and combinations
- Monthly revenue trends
These insights helped shape the Power BI report structure.
- Monthly revenue trend line chart
- Monthly transactions trend line chart
- KPI : Total Revenue, Total Orders
- Country-wise revenue
- Country-Wise Revenue Map showing where your money comes from
- Top 10 spenders & top order-makers
- Total spend and order count per customer
- Guest vs Registered customer counts
- Repeat Customer Rate (%)
- Slicer: Country filter
- Top-selling and highest revenue products
- Slicer: Country filter and date filter
Some custom measures built using DAX:
Total Revenue
Total Orders per Customer
Repeat Customer Rate (%)
Guest Customer Count
Registered Unique Customers
Monthly Revenue
Top Products by Revenue / Quantity
- PostgreSQL (via pgAdmin) – Data cleaning & SQL queries
- Power BI Desktop – Dashboard design & visuals
- DAX – Custom calculations
- VS Code – Script management
- Add RFM-based customer segmentation
- Build predictive revenue trends
- Tag or cluster products (if more metadata available)
Thanks for reading! ⭐️