Skip to main content

Power BI Sales & Inventory Forecasting Project (SARIMA)

Project Overview

In this project, I built an end-to-end Business Analytics & Data Science solution using SQL, Power BI, and Python to:

  • Analyze historical sales, profit, discounts, and units sold

  • Build an Executive Summary Dashboard for leadership

  • Forecast next 3 months of Sales & Units Sold

  • Support inventory planning and business decision-making

This project simulates a real-world eCommerce / Retail analytics use case, combining ETL, BI reporting, and predictive modeling in a single workflow.

Business Objective

Primary Goals

  • Provide leadership with a single-source executive dashboard

  • Identify sales, profit, and regional performance trends

  • Predict future demand (Sales & Units Sold) for:

    • Inventory planning

    • Revenue forecasting

    • Procurement & supply-chain readiness

Key Questions Answered

  • How are sales and profits trending over time?

  • Which regions and segments drive the most value?

  • What will be the expected sales & unit demand for the next 3 months?


Architecture & Tools Used

LayerTools
Data SourceSQL Database (simulated enterprise retail DB)
ETL & TransformationSQL, Power Query
Analytics & BIPower BI
ForecastingPython (SARIMA – statsmodels)
VisualizationPower BI + Python visuals
Skills DemonstratedSQL, ETL, Time Series, BI, Forecasting

Step 1: Data Extraction (ETL using SQL)

I started by extracting structured sales data using SQL from the transactional database.

Sample SQL ETL Query

SELECT  
    OrderDate,
    Country,
    Segment,
    Product,
    Sales,
    Profit,
    Discounts,
    UnitsSold,
    COGS
FROM Financials
WHERE OrderDate IS NOT NULL;

ETL Objectives

  • Select only business-relevant fields

  • Ensure date integrity

  • Prepare data for analytics & forecasting


Step 2: Data Cleaning & Transformation

Cleaning Actions

  • Removed duplicate rows

  • Handled null values

  • Standardized column names

  • Converted Month text → Month Number

  • Ensured consistent date format

Created a Date Dimension Table

Essential for:

  • Time intelligence (YoY, MoM)

  • Filtering by Year / Month / Quarter

DateTable =
ADDCOLUMNS (
    CALENDAR (DATE(2013,1,1), DATE(2015,12,31)),
    "Year", YEAR([Date]),
    "Month", FORMAT([Date], "MMMM"),
    "Month Number", MONTH([Date]),
    "Quarter", "Q" & FORMAT([Date], "Q")
)

Step 3: Executive Summary Dashboard (Power BI)

Dashboard Purpose

Designed for CXOs & Business Heads to get instant insights.

Key Visuals

  • 📈 Profit Trend by Date

  • 🌍 Profit by Country (Map)

  • 📊 Sales by Segment & Date

  • 🎛️ Interactive slicers (Year, Month)

Business Value

  • Quick performance monitoring

  • Region-wise profit analysis

  • Segment contribution clarity


Step 4: Predictive Analytics – Sales & Units Forecast

To support inventory and revenue planning, I built a 3-month forecast using SARIMA.


Why SARIMA?

SARIMA (Seasonal ARIMA) is ideal for retail/ecommerce data because:

  • Handles trend + seasonality

  • Works well with monthly sales patterns

  • Provides confidence intervals (risk visibility)

SARIMA Components

  • AR (p): Autoregression

  • I (d): Differencing (trend removal)

  • MA (q): Moving average

  • Seasonal (P, D, Q, s): Monthly seasonality (s = 12)


Step 5: Python SARIMA Forecast (Power BI Python Script)

Key Python Steps

  1. Convert Month text → numeric

  2. Create proper Date column

  3. Aggregate monthly sales

  4. Train SARIMA model

  5. Forecast next 3 months

  6. Plot actual + forecast + confidence band

Simplified SARIMA Code

from statsmodels.tsa.statespace.sarimax import SARIMAX

model = SARIMAX(
    monthly_sales['Units_Sold'],
    order=(1,1,1),
    seasonal_order=(1,1,1,12)
)

model_fit = model.fit()
forecast = model_fit.get_forecast(steps=3)
conf_int = forecast.conf_int()

Step 6: Predictive Visualization in Power BI

Forecast Dashboard Includes

  • Actual historical trend

  • Forecasted next 3 months

  • Upper & lower confidence limits

  • Separate visuals for:

    • Units Sold

    • Sales Value

Business Impact

  • Better inventory planning

  • Reduced stock-out risk

  • Data-backed procurement decisions


Insights & Outcomes

Key Insights

  • Clear seasonal demand patterns

  • Certain months show predictable spikes

  • Forecast confidence helps risk planning

Business Value Delivered

  • Executive-ready reporting

  • Predictive decision support

  • Scalable analytics framework


Skills Demonstrated

  • SQL & ETL pipelines

  • Power BI data modeling

  • DAX & Date intelligence

  • Time-series forecasting

  • Python scripting in Power BI

  • Business storytelling with data





Comments