Home / Projects
DA · BA-02In progress

Excel Analytics

Sales analytics built end-to-end in Excel used as a real analytics engine — Power Query for ETL, a Power Pivot star schema, a DAX measure library, an interactive dashboard, and what-if scenario analysis. From raw CSV to an executive-ready report.

Data sourceOlist Brazilian E-Commerce (Kaggle) — ~100k real orders across related tables: orders, order items, products, customers, sellers. Superstore is a drop-in alternative when native cost/profit columns are preferred.
ArchitectureSource CSV / PostgreSQL → Power Query (M) ETL → Power Pivot star schema → DAX measure library → interactive dashboard + what-if scenarios
StorageSource CSVs (or a PostgreSQL database) ingested via Power Query; the analytical model lives inside the workbook as an in-memory Power Pivot model.
Stack
Power QueryMPower PivotDAXExcelPostgreSQL
StatusIn progress

Context

Commercial teams live in Excel, yet most sales workbooks stop at a pivot table over a single flat sheet. This project treats Excel as a full analytics platform: a governed ETL layer, a dimensional data model, a reusable DAX measure library, and an interactive dashboard a decision-maker can actually explore.

Business Problem

Which product categories, regions, and sellers drive revenue and margin — and how is the business trending month over month and year over year?

Leadership needs a single, self-service view to read performance, spot outliers, and test scenarios before committing budget.

Architecture

Olist CSVs / PostgreSQL Power Query · M Power Pivot · star schema DAX measures Dashboard · slicers What-if scenarios

The model is a star schema built inside Excel — a central fact table surrounded by conformed dimensions, joined by explicit one-to-many relationships. A dedicated date dimension unlocks time intelligence. This is the line between a spreadsheet and a model.

TableTypeGrain / RoleKey
fact_order_itemsFactone row per order line itemorder_id + item
dim_dateDimensioncalendar for time intelligencedate
dim_productDimensionproduct & categoryproduct_id
dim_customerDimensioncustomer geographycustomer_id
dim_sellerDimensionseller geographyseller_id

Data Source

Methodology

The build follows CRISP-DM:

  1. Business Understanding — frame the revenue / margin / trend questions above.
  2. Data Understanding — profile the Olist tables, keys, and quality issues.
  3. Data Preparation — clean and shape with Power Query (M).
  4. Modeling — star schema in Power Pivot plus DAX measures.
  5. Evaluation — validate measures against manual checks; sanity-check totals.
  6. Deployment — interactive dashboard plus executive summary.

1. Power Query — ETL

Repeatable, refreshable ETL in M: type coercion, deduplication, null handling, key normalization, category-name translation, and merging the Olist tables into clean fact and dimension queries. Every step is captured in the query and re-runs on Refresh All — no manual copy-paste.

2. Power Pivot — data model

The star schema shown under Architecture above: one fact table at line-item grain, conformed dimensions, explicit one-to-many relationships, and a dedicated date dimension for time intelligence.

3. DAX — measures

A reusable measure library instead of one-off cell formulas, covering revenue, gross margin, average ticket, and MoM / YoY growth:

Revenue        = SUMX ( fact_order_items, fact_order_items[price] * fact_order_items[quantity] )
Orders         = DISTINCTCOUNT ( fact_order_items[order_id] )
Average Ticket = DIVIDE ( [Revenue], [Orders] )
Gross Margin % = DIVIDE ( [Revenue] - [Cost], [Revenue] )

Revenue PM     = CALCULATE ( [Revenue], DATEADD ( dim_date[date], -1, MONTH ) )
Revenue MoM %  = DIVIDE ( [Revenue] - [Revenue PM], [Revenue PM] )

Revenue PY     = CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( dim_date[date] ) )
Revenue YoY %  = DIVIDE ( [Revenue] - [Revenue PY], [Revenue PY] )

4. Interactive dashboard

A single-page dashboard driven by slicers (category, region, seller) and a timeline for date filtering, with KPI cards, a trend line, and category/region breakdowns. One click re-slices the whole page.

5. What-if / scenario analysis

Scenario analysis with Excel Data Tables and Scenario Manager plus what-if parameters: model how a change in discount rate, freight, or commission moves revenue and margin — so leadership can pressure-test a decision before making it.

AI assist

The executive summary is drafted with an LLM from the validated measures and findings, then reviewed, corrected, and approved by the analyst before it ships. AI accelerates the writing; the human owns the numbers and the conclusions. AI assists, human validates.

Challenges

These are the problems the build has to solve — named up front so the finished project can be judged on how it handled them.

Results

In progress. The workbook has not been built yet, so no revenue, margin, or growth figures are published here. The lines below are the questions the model is designed to answer — not answers. They get replaced with real, sourced numbers, the dashboard screenshots, and the margin assumption stated in full when the build is done.

Planned insight lines, to be replaced with real figures:

The provisional recommendations in the repository README — reallocating spend toward high-margin, under-growing categories; revisiting discount and freight policy in declining regions; prioritizing the most profitable segments rather than only the highest-volume ones — are framing, and will be finalized from the analysis.

Tech Stack

LayerTool
ETL / cleaningPower Query (M)
Source dataCSV / PostgreSQL
Data modelPower Pivot (star schema)
MeasuresDAX
DashboardExcel — slicers, timeline, PivotCharts
Scenario analysisData Tables / Scenario Manager
NarrativeLLM-assisted draft, human-validated
← Previous
Customer Churn — Revenue at Risk