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

Popular posts from this blog

Raghvendra Singh Portfolio

  I’m Raghvendra Singh Business Analytics & Data Science Professional I help businesses make data-driven decisions using analytics, dashboards and data science techniques across Ecommerce, Retail, Finance and Marketing . I specialize in converting raw data into clear insights, measurable impact and actionable recommendations for business leaders and teams. Profile Links Github LinkedIn Portfolio  Below are selected projects showcasing my work in analytics, data science and business problem-solving . 1. Digital Marketing Ads Clustering for Ads24x7 2. Inferential statistics: Probability to ANOVA 3. Power BI Sales & Invetory forecasting using SARIMA, SQL, Python 4. Power BI/ Looker/ Tableu- Neerus Dashboards - Myntra payments dashboard 5. Text Analytics using NLP on political speeches analysis 6.  Election Data Classification: End to end analysis 7.  📬 Let’s Connect 📧 Email: raghavsingh0027 @gmail.com 🔗 LinkedIn: https://www.linkedin.com/in/raghvendra0...

A Comprehensive Guide to Statistical Techniques and Analysis for Data Science

  In the field of data science, statistical analysis plays a critical role in making sense of large datasets, uncovering patterns, and drawing actionable insights. Data wrangling, or the process of cleaning and transforming raw data into a usable format, is equally essential to prepare data for statistical analysis. This blog will provide an overview of key statistical techniques for data analysis, along with practical code snippets to apply them using Python. What is Data Wrangling? Data wrangling involves cleaning, restructuring, and transforming raw data into a format that is easier to analyze. This process may include handling missing data, dealing with inconsistent formatting, or aggregating data. Python libraries such as Pandas and NumPy are commonly used for this purpose. Basic Data Wrangling Techniques Before diving into statistical analysis, it’s important to ensure the data is properly cleaned and prepared. Below are some common data wrangling techniques, along wit...

What tools do you need to start your Data Science journey?

  Welcome back to AI Councel Lab ! If you're reading this, you're probably eager to start your journey into the world of Data Science . It's an exciting field, but the vast array of tools and technologies can sometimes feel overwhelming. Don't worry, I’ve got you covered! In this blog, we’ll explore the essential tools you’ll need to begin your Data Science adventure. 1. Programming Languages: Python and R The first step in your Data Science journey is learning how to code. Python is widely regarded as the most popular language in Data Science due to its simplicity and vast libraries. Libraries like NumPy , Pandas , Matplotlib , and SciPy make Python the go-to tool for data manipulation, analysis, and visualization. R is another great language, especially for statistical analysis and visualization. It's commonly used by statisticians and data scientists who need to work with complex data and models. Recommendation: Start with Python , as it has broader appli...