RetailMart Sales Analytics - Python, PostgreSQL, Power Bi
Date
Service
Data Analysis
Client
Personal Project

Project Overview
The RetailMart Sales Analytics project is an end-to-end data analytics solution developed to analyze sales performance, profitability, customer behavior, product performance, returns, inventory, and regional trends.
The project transforms raw retail data into meaningful business insights using Python, PostgreSQL, SQL, and Power BI, enabling stakeholders to monitor business performance and support data-driven decision-making.
Business Problem
Retail businesses generate data across customers, orders, products, employees, suppliers, returns, and inventory, making it challenging for management to obtain a consolidated view of overall business performance.
The objective of this project is to build an end-to-end analytics solution that cleans and analyzes retail data, stores structured data in PostgreSQL, performs business analysis using SQL, and presents key KPIs and insights through an interactive Power BI dashboard.
The analysis focuses on understanding sales and profitability trends, product and regional performance, customer segments, return patterns, discount impact, and inventory requirements.
Dataset
Industry : Retail / Sales Analytics
Source : RetailMart Sales Dataset
File Format : CSV (.csv)
Total Orders : 5,000
Key Data Areas
Customers
Orders
Products
Returns
Inventory
Employees
Suppliers
Sales and Profitability
Tools Used
Python
Pandas
NumPy
PostgreSQL
SQL
Microsoft Power BI
Power Query
DAX
Data Modeling
KPI Cards
Interactive Slicers
Tooltips
Page Navigation
Data Visualization
Project Methodology
The project was completed using the following end-to-end analytical workflow:
Data Collection
Data Understanding and Exploration
Data Cleaning using Python and Pandas
Exploratory Data Analysis (EDA)
Business Analysis using Python
Revenue and Profitability Analysis
Operations Analysis
PostgreSQL Database Development
SQL Business Analysis
Data Modeling in Power BI
DAX Measure Creation
KPI Development
Interactive Dashboard Design
Business Insight Generation
Business Recommendations
Dashboard Overview
The Power BI report consists of four interactive pages designed to provide management with a comprehensive view of RetailMart's business performance.
Page 1 – Executive Overview
Provides a high-level view of overall business performance, including ₹396.99M total sales, ₹51.47M total profit, 12.97% profit margin, 5K orders, 100 customers, and a 6.00% return rate.
The page also analyzes monthly sales trends, sales and profit by product category, and regional sales performance.
Page 2 – Sales & Profit Performance
Provides detailed profitability analysis across products and brands.
The page tracks total sales, total cost, total profit, profit margin, and average order value, along with monthly sales versus profit trends, discount impact on profit, top products by profit, brand profitability, and sales versus profit by product.
Page 3 – Operations & Customer Insights
Focuses on customer and operational performance through customer sales, customer segments, returns, inventory, and reorder requirements.
The page includes KPIs for total customers, total returns, return rate, products requiring reorder, and total quantity sold. It also identifies top customers, major return reasons, stock levels across warehouses, and products requiring replenishment.
Page 4 – Monthly Sales vs Profit Trend
Provides a detailed time-based comparison of monthly sales and monthly profit, allowing users to examine performance across 2025 and 2026 and investigate monthly changes in business performance.
Key Highlights
Insights
RetailMart generated ₹396.99M in total sales and ₹51.47M in total profit, resulting in a 12.97% profit margin.
Electronics is the strongest product category, generating approximately ₹116M in sales and ₹18.7M in profit.
The South region dominates regional performance with approximately ₹251M in sales, significantly ahead of the West and North regions.
Monthly sales performance fluctuates across the analysis period, highlighting periods of stronger and weaker business activity.
Higher discount levels are associated with lower overall profit contribution, indicating that discounting should be managed carefully.
VIP customers generate the highest sales among customer segments at approximately ₹148M, followed by Premium and Regular customers.
RetailMart recorded 300 returns, representing an overall 6.00% return rate.
Damaged products are the most common return reason, followed by wrong items and late deliveries.
Inventory analysis identified 2 products requiring reorder, indicating immediate replenishment requirements.
Warehouse stock is highest at WH-HYD, followed by WH-DEL, WH-MUM, and WH-BLR.
Recommendations
Prioritize Electronics and other high-performing categories while continuously monitoring their profitability and inventory availability.
Investigate opportunities to improve performance in the West and North regions, which contribute substantially less sales than the South region.
Review discount strategies and focus discounts on situations where they can increase demand without significantly reducing profitability.
Strengthen retention and engagement strategies for VIP and Premium customers, which represent high-value customer segments.
Investigate the causes of damaged-product returns and improve product handling, packaging, and quality-control processes.
Review wrong-item and late-delivery returns to identify potential improvements in order fulfillment and logistics.
Replenish products that have fallen below their reorder levels to reduce the risk of stockouts.
Monitor warehouse-level inventory regularly and redistribute stock where necessary based on product demand.
Explore the Complete Project
Click the link below to explore the GitHub projects, Python notebooks, SQL analysis, Power BI dashboard, and datasets. ↓


