top of page

 

AI-Driven Retail Insights Dashboard (Power BI + ChatGPT) 

 

​

​

​

​​

1. The Mission (Project Context)

The goal of this project was to solve the 'Interpretation Gap'—the time it takes for an executive to look at a chart and understand the necessary action. By integrating ChatGPT via Python scripts within Power BI, I built a dashboard that not only visualizes retail performance but also generates natural language narratives and sentiment-driven strategy recommendations in real-time.

​

2. The Interactive Stack (The Visuals)

  • Screen 1: Overview

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

  • Screen 2: Tooltip - Insight 1

​

​

​

​

​

​

​

​

​

​

​

  • Screen 3: Tooltip - Insight 2

​

​

​

​

​

​

​

​

​

​

​

  • Screen 4: Tooltip - Insight 3

​

​

​

​

​

​

​

​

​

​

​

  • Screen 5: Tooltip - Insight 4

​

​

​

​

​

​

​

​

​

​

​

​

  • Screen 6: Tooltip - State Insight

​

​

​

​

​

​

​

  • Screen 7: Tooltip - Category Insight

​

​

​

​​

​​

​​

​

  • Screen 8: Tooltip - Sub-Category Insight

​

​

​

​

​

​

​​​

  • Screen 9: Guided Insights (Executive Summary)

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

  • Screen 10: Insight Deep Dive (Detailed Analysis)

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

3. Technical Architecture

  • AI Integration: Implemented a Python transformation layer using the OpenAI library to send aggregated sales data and customer comments to the GPT-4 API.

  • Data Modeling: A classic Star Schema optimized for AI-querying. I created a "Summarization Table" that stores pre-processed AI insights to ensure the dashboard remains fast for the end-user.

  • Geospatial Intelligence: Integrated a custom TopoJSON map (usa.states.topo.json) to correlate AI-detected regional sentiment with physical sales performance across the US.

​

4. Key Business Insights (“The Discovery”)

  • Predictive Sentiment: The AI identified that a 10% drop in customer sentiment for the 'Electronics' category was a leading indicator of a sales slump two weeks later—providing a "pre-warning" system that traditional BI would miss.

  • Automated Root-Cause: While sales were up in the West region, the AI flagged that profit was lagging due to "hidden" shipping costs mentioned in customer feedback regarding late deliveries and damaged goods.

  • Clustered Topic Analysis: Using AI, I clustered 5,000+ customer comments into three main buckets: Price Sensitivity, Product Quality, and Shipping Reliability, allowing the business to target specific operational fixes.

​

5. Strategic Recommendations

  • Sentiment-Based Pricing: Implement a dynamic pricing floor for products with high positive sentiment scores to maximize margin while customer "hype" is at its peak.

  • Automated Feedback Loop: Use the AI-generated sentiment clusters to automatically route high-priority "Quality" complaints directly to the Manufacturing team, bypassing manual sorting.

  • AI-Driven Inventory: Reduce stock levels for product codes where the AI-detected sentiment is trending downward, even if current sales are still positive.

​

6. Let’s Talk About the Data

"The technical challenge was integrating an LLM into the Power BI refresh cycle. Since calling an API for every row is inefficient and costly, I engineered a Grouping & Batching strategy. I wrote a Python script that grouped data by Category and Week before sending it to ChatGPT. This reduced API calls by 95%, ensuring the project stayed within budget while still delivering high-quality, human-like summaries of the business performance."

​

AI-Driven Retail Insights Dashboard (Power BI + ChatGPT) Build Guide

A streamlined guide for replicating the project:

1. Prepare the Data

  • Load dataset into Power BI

  • Create a proper Date table

  • Build relationships (Date → Orders, Category → Products, etc.)

​

2. Create Core Measures

  • Total Sales

  • Total Profit

  • Profit Margin %

  • Category Contribution %

  • Sub-Category Rank

  • Unprofitable Product Count

  • Narrative Insight Measures (State_Message, Category_Message, Sub-Category_Message)

​

3. Build Core Visuals

  • Clustered column chart (Monthly Sales & Profit)

  • Filled map (State Profitability)

  • Bar charts (Category & Sub-Category comparisons)

​

4. Design Tooltip Insight Pages

Create four tooltip pages:

  • Tooltip — Insight 1 (Sales & Profit Overview)

  • Tooltip — Insight 2 (Regional Profitability)

  • Tooltip — Insight 3 (Category Profitability)

  • Tooltip — Insight 4 (Unprofitable Product Risk)

​

And three analytical tooltips:

  • Tooltip — State Insight

  • Tooltip — Category Insight

  • Tooltip — Sub-Category Insight

​

Set each tooltip page to:

  • Type: Tooltip

  • Page Size: Tooltip

  • Add charts + narrative text boxes

  • Assign each tooltip to its matching visual

​

5. Build Executive Summary Pages

  • Guided Insights (Executive Summary)

  • Insight Deep Dive pages

  • Align visuals using Snap to Grid

  • Apply theme and consistent spacing

  • Add AI-generated narratives under each insight

​

6. Final Polishing

  • Format decimals (2 dp for tooltips)

  • Lock objects

  • Check tooltips on hover

  • Test filters

  • Publish to Power BI Service

​

​

​

bottom of page