Skip to content

Power BI + Python + MySQL project analyzing retail sales, profit, and customer trends to drive business decisions.

Notifications You must be signed in to change notification settings

sdlk4/Retail-Sales-Performance-Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retail Sales Performance Dashboard

A comprehensive retail analytics solution that helps retail managers understand sales performance, profitability, and growth patterns across multiple dimensions. This project transforms raw transactional data into actionable insights through interactive dashboards and automated data processing.

Business Problem

Retail managers need to understand:

  • Sales Performance: Track total sales, profit margins, and year-over-year growth
  • Geographic Insights: Identify high-performing regions, states, and cities
  • Product Analysis: Discover top/bottom performers by category and sub-category
  • Customer Behavior: Analyze average order value and return patterns
  • Operational Efficiency: Monitor return rates and their impact on profitability

No more spreadsheet headaches – get clear, visual insights that drive better business decisions.

Project Structure

  • ├── data/
  • │ ├── orders.csv # Primary sales transaction data
  • │ ├── people.csv # Sales representative information
  • │ ├── returns.csv # Product return records
  • │ └── superstore.sql # Database schema and queries
  • ├── scripts/
  • │ ├── .env # Environment configuration
  • │ └── load_data.py # Data loading and preprocessing script
  • ├── retail_dashboard.pbix # Power BI dashboard file
  • └── requirements.txt # Python dependencies

Success Metrics & Dashboard Features

The dashboard delivers key performance indicators that matter most:

Financial Performance

  • Total Sales: Complete revenue tracking across all dimensions
  • Total Profit: Bottom-line profitability analysis
  • Profit Percentage: Margin analysis for strategic decision-making
  • YOY Growth: Year-over-year sales and profit growth trends

Product Intelligence

  • Top/Bottom Products: Identify star performers and underperformers by profit
  • Category Analysis: Deep dive into product categories and sub-categories
  • Product Profitability: Understand which products drive the most value

Geographic Insights

  • Sales by Region: Regional performance comparison
  • State-Level Analysis: State-by-state breakdown for targeted strategies
  • City Performance: Local market insights for operational planning

Customer & Operations Metrics

  • Average Order Value (AOV): Customer spending behavior analysis
  • Return Rate: Product quality and customer satisfaction indicators
  • Return Impact on Profit: Financial effect of returns on overall profitability

Getting Started

Prerequisites - You'll need:

  • Python 3.7+ for data processing
  • Power BI Desktop for dashboard visualization
  • Access to the retail dataset (orders, people, returns)

Installation

Install Python dependencies:

  • install -r requirements.txt

Configure environment variables:

  • Copy .env.example to .env
  • Update database connection settings if using SQL data source

Load and process data:

  • python scripts/load_data.py

Open the dashboard:

  • Launch Power BI Desktop
  • Open retail_dashboard.pbix
  • Refresh data connections if needed

How It Works

Data Processing (scripts/load_data.py)

  • Data Integration: Combines orders, people, and returns data
  • Data Cleaning: Handles missing values and data quality issues
  • Feature Engineering: Creates calculated fields for advanced analytics
  • Performance Optimization: Prepares data for efficient dashboard rendering

Database Setup (superstore.sql)

  • Schema Definition: Establishes proper data relationships
  • Query Optimization: Pre-built queries for common analytics scenarios
  • Data Validation: Ensures data integrity and consistency

Dashboard (retail_dashboard.pbix)

  • Interactive Visualizations: Drill-down capabilities across all dimensions
  • Real-time Filtering: Dynamic filtering by date, region, category, and more
  • Performance Monitoring: KPI cards with trend indicators
  • Export Capabilities: Generate reports for stakeholder sharing

Key Features

Multi-Dimensional Analysis

Analyze performance across time, geography, products, and customers simultaneously

Actionable Insights

Focus on metrics that directly impact business decisions and profitability

Automated Data Pipeline

Streamlined data processing from raw files to dashboard-ready datasets

Trend Analysis

Year-over-year comparisons and growth tracking for strategic planning

Return Analysis

Comprehensive return rate analysis with profit impact assessment

Geographic Intelligence

Region, state, and city-level insights for targeted market strategies

Sample Insights

The dashboard typically reveals insights like:

  • Top-performing regions generating 60%+ of total profits
  • Seasonal trends showing Q4 sales spikes of 40-50%
  • Product categories with the highest profit margins (>25%)
  • Return rates by category and their financial impact
  • Customer segments with highest average order values

Data Sources

Orders Data (orders.csv)- Primary transactional data including:

  • Order details and dates
  • Product information and categories
  • Sales amounts and quantities
  • Customer and geographic data

People Data (people.csv)- Sales representative information for:

  • Regional sales assignments
  • Performance tracking by rep
  • Territory management insights

Returns Data (returns.csv)- Product return information for:

  • Return rate calculations
  • Quality issue identification
  • Profit impact analysis

Technical Requirements- Python Dependencies

  • pandas - Data manipulation and analysis
  • numpy - Numerical computing
  • python-dotenv - Environment variable management
  • sqlalchemy - Database connectivity (if using SQL source)

Power BI Requirements

  • Power BI Desktop (latest version recommended)
  • Sufficient system memory for large datasets
  • Network access for data refresh (if using live connections)

Performance Considerations

  • Data Volume: Optimized for datasets up to 1M+ transactions
  • Refresh Time: Typical data refresh takes 2-5 minutes
  • Memory Usage: Recommends 8GB+ RAM for optimal performance
  • Storage: Dashboard file size typically 50-100MB depending on data volume

Contributing

Have ideas for new metrics or visualizations? We'd love your input:

  • Fork the repository
  • Create a feature branch (git checkout -b feature/new-analysis)
  • Make your changes
  • Submit a pull request with detailed description

Support & Troubleshooting- Common Issues

  • Data Connection Errors: Check .env configuration and file paths
  • Dashboard Not Loading: Verify Power BI version compatibility
  • Performance Issues: Consider data filtering or aggregation optimization

Getting Help

  • Review the troubleshooting section in our documentation
  • Check existing GitHub issues for similar problems
  • Create a new issue with detailed error descriptions

About

Power BI + Python + MySQL project analyzing retail sales, profit, and customer trends to drive business decisions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages