Skip to main content
Zakaria Maachou
Selected projects

Independent portfolio case study

03

Case study / Growth Profitability Analytics

E-commerce Profit Leak Analysis

Business question

Where is margin being destroyed?

Verified signalElectronics / EU drives margin loss; higher discounts reduce margin.
Inspect the evidence
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.

01

Executive decision brief

The decision, before the documentation.

A concise chain from the commercial question to the recommended action.

  1. Question

    Where is margin being destroyed?

  2. Observed signal

    Electronics / EU drives margin loss; higher discounts reduce margin.

    Profit
    €214,041
    Loss-making order rate
    16.01%
  3. Interpretation

    Margin leak is concentrated in Electronics / EU, and high discount levels systematically reduce margin.

  4. Recommended decision

    Review discount policy on Electronics in EU — highest margin erosion zone

02

Primary evidence

Inspect the analytical exhibit.

The dashboard is presented as reviewable evidence, with the full analytical context preserved.

Exhibit 01

Profit Leak Analysis / primary analytical output

E-commerce Profit Leak Analysis dashboard showing profitability dashboard — discount & category-region view
Figure 01

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.
03

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
Revenue€2,054,589
Profit€214,041
  1. 01

    Profit margin

    10.42%
  2. 02

    Avg. discount

    17.39%
  3. 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.
  1. 01

    Review discount policy on Electronics in EU — highest margin erosion zone

  2. 02

    Cap promotional depth on categories with negative contribution margin

  3. 03

    Monitor loss-making order rate weekly as a leading profitability KPI

  4. 04

    Prioritize assortment and pricing fixes on weak category-region segments

04

Method and quality

How the conclusion was built.

The technical record stays inspectable without displacing the business question.

Methodology

  1. 01

    Built a DuckDB analytical layer on order-level data (12,000 orders)

  2. 02

    Calculated revenue, profit, margin and discount metrics by segment

  3. 03

    Identified loss-making orders and category-region combinations

  4. 04

    Visualized profitability drivers in Tableau for business stakeholders

  5. 05

    Translated SQL findings into actionable commercial recommendations

Quality controls

  1. 01

    DuckDB SQL layer and documented KPI queries

  2. 02

    Python dataset generation, validation and export pipeline

  3. 03

    Tableau workbook and dashboard screenshot

  4. 04

    Reproducible GitHub repository

Tools in service of the question

  • SQL / DuckDB
  • Tableau
  • Python
05

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.
06

Evidence handoff

Inspect the work.

Open the underlying repository, methodology and analytical artifacts.

  1. 01
    Synthetic dataset generator

    Seeded Python generator defining category and region distributions, discount and cost profiles, and explicit profit-leak scenarios.

    (opens in a new tab)
  2. 02
    Profit staging model

    Order-level SQL transformation calculating profit, profit margin, discount bands and monthly reporting grain.

    (opens in a new tab)
  3. 03
    Executive KPI SQL

    Aggregate SQL for orders, revenue, cost, profit, margin, average discount and loss-making order rate.

    (opens in a new tab)
  4. 04
    Profit-leak segment SQL

    Category-by-region analysis ranking the weakest segments by profit and margin performance.

    (opens in a new tab)
  5. 05
    Tableau workbook

    Inspectable Tableau workbook connected to the project’s generated profitability outputs.

    (opens in a new tab)
Next case / Revenue & Retention AnalyticsRenewalOS

Can revenue KPIs be trusted before Customer Success teams prioritize accounts?