Independent portfolio case study
Case study / Growth Profitability Analytics
E-commerce Profit Leak Analysis
Business question
Where is margin being destroyed?
- Orders analyzed
- 12,000
- Revenue
- €2,054,589
- Profit
- €214,041
Dataset disclosureSynthetic e-commerce order data generated with Python. The analysis covers 12,000 simulated orders and does not represent the performance of a real company.
Executive decision brief
The decision, before the documentation.
A concise chain from the commercial question to the recommended action.
- Question
Where is margin being destroyed?
- Observed signal
Electronics / EU drives margin loss; higher discounts reduce margin.
- Profit
- €214,041
- Loss-making order rate
- 16.01%
- Interpretation
Margin leak is concentrated in Electronics / EU, and high discount levels systematically reduce margin.
- Recommended decision
Review discount policy on Electronics in EU — highest margin erosion zone
Primary evidence
Inspect the analytical exhibit.
The dashboard is presented as reviewable evidence, with the full analytical context preserved.
Profit Leak Analysis / primary analytical output

Profitability dashboard — discount & category-region view
Synthetic e-commerce order data generated with Python. The analysis covers 12,000 simulated orders and does not represent the performance of a real company.Analysis and diagnosis
From signal to commercial meaning.
This independent case study examines where profitability erodes across categories, regions and discount strategies using order-level e-commerce data.
Commercial pressure record
Revenue → profit → margin diagnosis- 01
Profit margin
10.42% - 02
Avg. discount
17.39% - 03
Loss-making order rate
16.01%
Margin leak is concentrated in Electronics / EU, and high discount levels systematically reduce margin.
Finding / interpretation
Margin leak is concentrated in Electronics / EU, and high discount levels systematically reduce margin.
Decision layer
Recommended business action
Recommendations follow the evidence in this independent case study; no tested uplift is implied.- 01
Review discount policy on Electronics in EU — highest margin erosion zone
- 02
Cap promotional depth on categories with negative contribution margin
- 03
Monitor loss-making order rate weekly as a leading profitability KPI
- 04
Prioritize assortment and pricing fixes on weak category-region segments
Method and quality
How the conclusion was built.
The technical record stays inspectable without displacing the business question.
Methodology
- 01
Built a DuckDB analytical layer on order-level data (12,000 orders)
- 02
Calculated revenue, profit, margin and discount metrics by segment
- 03
Identified loss-making orders and category-region combinations
- 04
Visualized profitability drivers in Tableau for business stakeholders
- 05
Translated SQL findings into actionable commercial recommendations
Quality controls
- 01
DuckDB SQL layer and documented KPI queries
- 02
Python dataset generation, validation and export pipeline
- 03
Tableau workbook and dashboard screenshot
- 04
Reproducible GitHub repository
Tools in service of the question
- SQL / DuckDB
- Tableau
- Python
Transparency record
What this work does—and does not—claim.
Dataset origin, ownership and material limitations remain part of the main narrative.
- 01Project type
- Independent portfolio case study
- 02Ownership
- Individual end-to-end project
- 03Dataset origin and boundary
- Synthetic e-commerce order data generated with Python. The analysis covers 12,000 simulated orders and does not represent the performance of a real company.
Evidence handoff
Inspect the work.
Open the underlying repository, methodology and analytical artifacts.
- 01Synthetic dataset generator(opens in a new tab)
Seeded Python generator defining category and region distributions, discount and cost profiles, and explicit profit-leak scenarios.
- 02Profit staging model(opens in a new tab)
Order-level SQL transformation calculating profit, profit margin, discount bands and monthly reporting grain.
- 03Executive KPI SQL(opens in a new tab)
Aggregate SQL for orders, revenue, cost, profit, margin, average discount and loss-making order rate.
- 04Profit-leak segment SQL(opens in a new tab)
Category-by-region analysis ranking the weakest segments by profit and margin performance.
- 05Tableau workbook(opens in a new tab)
Inspectable Tableau workbook connected to the project’s generated profitability outputs.
Can revenue KPIs be trusted before Customer Success teams prioritize accounts?