Project Case Study · Financial Sales Analytics
700 rows. 5 segments. 5 countries. 6 products. One uncomfortable question: where is profit actually being made — and where is it being quietly lost? The answers challenged every assumption about revenue, discounts and efficiency.
Scroll01 — The Brief
Most financial reports answer the same question: how much did we sell? This project asked a harder one — where is profit actually being made, and where is it being quietly lost? Starting with a single Excel file of 700 financial sales transactions covering 5 customer segments, 5 countries and 6 products across 2013 and 2014, the goal was to move beyond revenue and expose the real profit story underneath.
The dataset contained everything needed to go deep: gross sales, discounts applied, cost of goods sold, actual sales revenue and profit — all at the transaction level. The question was whether the segments generating the most revenue were actually the most profitable, whether discounts were helping or hurting, and which products were hiding efficiency under low volume numbers.
The approach was a full end-to-end pipeline built in Azure Databricks — Bronze layer preserving the raw data, Silver layer cleaning and enriching with three calculated columns (profit margin %, discount impact £ and cost ratio %), and five Gold aggregation tables each designed to answer a specific business question.
Python visualisations were built directly in Databricks notebooks using Matplotlib and Seaborn to surface findings before they reached the Power BI dashboard. The final deliverable was a 5-page interactive Power BI dashboard with 7 custom DAX measures — built on the Silver table to preserve full transaction-level flexibility.
02 — Data Engineering
Built entirely in Azure Databricks using PySpark and Python. The pipeline ran from raw Excel file through full profiling, cleaning, feature engineering and aggregation — producing five purpose-built Gold tables that each answered a specific business question, plus a Silver table connected directly to Power BI for full dashboard flexibility.
Pandas → PySpark
PySpark · Delta Lake
PySpark · groupBy · agg
Matplotlib · Seaborn · Power BI
Databricks Catalog — financial_sales schema
The financial_sales schema contains 6 tables: one Silver table (silver_financial_sales) holding the full cleaned and enriched transaction dataset, and five Gold tables — gold_discount_analysis, gold_monthly_trend, gold_profitability_by_country, gold_profitability_by_product and gold_profitability_by_segment — each built to answer one specific business question. Raw data is stored in the raw_files volume.
03 — At a Glance
Critical Finding — The Loss-Making Segment
($614,545)
Enterprise segment profit — the only segment actively destroying value.
While Government generated $11.4M in profit and Small Business $4.1M, Enterprise recorded a net loss of $614,545. Every Enterprise sale costs more than it brings in. This is not a marginal underperformer — it is a segment where the business is paying to serve customers. The data raises an urgent question: what is driving Enterprise costs above revenue, and is the current pricing and discount strategy appropriate for this segment?
04 — The Dashboard
Connected to the silver_financial_sales Delta table in Databricks. Seven custom DAX measures — Total Sales, Total Profit, Total Gross Sales, Total Discounts, Total COGS, Avg Profit Margin % and Total Units Sold — power every visual across all five pages. Dynamic slicers for Segment, Country, Product, Discount Band and Date allow any combination of filtering.
05 — Python Visualisation
Before building the Power BI dashboard, key findings were visualised directly in the Databricks notebook using Matplotlib and Seaborn. Conditional colouring was used deliberately — red bars for negative profit made Enterprise's loss immediately visible without needing to read a number.
06 — Key Findings
Finding 01
Finding 02
Finding 03
Finding 04
Finding 05
Finding 06
07 — Recommendations
Investigate Enterprise immediately
A loss-making segment cannot be left unaddressed. The business needs to understand whether Enterprise losses are driven by pricing too low, discounting too heavily, high service costs or low volume. Until this is understood, every Enterprise sale is destroying value.
Market Carretera aggressively
Carretera is the most cost-efficient product (lowest production cost, highest margin at 29.9%) but sells the least. A targeted marketing push would increase total profit without proportionally increasing costs — making it the single highest-leverage growth opportunity in the product range.
Make discounting strategic, not habitual
Discounts should be seasonal, segment-specific and volume-justified. Before applying a discount, the business should calculate whether the expected volume increase covers the margin sacrifice. High discounts (24.9% margin) should only be used when guaranteed volume returns justify the cost.
Investigate VTT and Velo production costs
Both VTT and Velo carry a 74% cost ratio — meaning 74 cents of every sales dollar goes to production. If costs cannot be reduced, the strategy must shift to volume growth to compensate. Understanding whether these costs are controllable is a critical business decision.
Plan for October — capitalise on the seasonal peak
October consistently delivers the highest profit across both years. The business should plan its highest-margin product pushes and marketing campaigns ahead of this window to maximise the seasonal uplift rather than simply benefiting from it passively.
Track France as a profitability model
France generates the most profit despite not having the highest revenue. Understanding what France does differently — product mix, discount levels, segment focus — could be a blueprint for improving profitability in lower-performing countries like Mexico.
Full Report
15-slide presentation covering the full analysis, findings, discount deep dive and recommendations.