All case studies

E-commerce Sales & Customer Analytics

Customer value cannot be judged by repeat purchasing alone. A validated data pipeline and four-page Power BI dashboard turn historical transactions into a clearer view of sales, customers, and the questions worth testing next.

An independent analytical case study using Olist public data. This is not a commissioned client engagement; no production deployment or demonstrated commercial returns are claimed.

  • Python
  • SQL
  • SQLite
  • Power BI
Completed orders
96,478
Unique completed customers
93,358
Power BI report pages
4

The project at a glance

Challenge
Understand sales and customer value without relying on repeat-purchase counts alone.
Solution
A checked Python and SQL workflow feeding four Power BI report pages.
Finding
A small group of high-value one-time customers accounted for a disproportionate share of observed item sales.
Next decision
Assess whether targeted outreach is worth testing using current data and a controlled comparison.

Look beyond
the repeat purchase.

The strongest finding is a gap between customer count and observed sales contribution. Frequency alone misses an important part of the picture.

High-value one-time customers

7,095 customers in the observed history

Share of customers7.6%
Share of observed item sales34.56%

Both bars use a 0–100% scale. High value means observed customer item sales above 315.40 source units, using Q3 + 1.5 × IQR. This describes historical value; it does not predict loyalty or lifetime value.

3.00%

Observed repeat customer rate

2,801 of 93,358 customers placed at least two completed orders in the available history. This is observed repeat purchasing, not lifetime retention.

56.62%

Sales from the top 20% of customers

Customer-level concentration was measured directly. The result does not support a literal 80/20 sales assumption.

How concentrated are observed sales?

Customers are ranked from highest to lowest observed item sales. The curve shows the cumulative share of sales as more customers are included; the dashed line marks an equal share.

The top 20% of customers (18,672) account for 56.62% of observed item sales.

0%0%25%25%50%50%75%75%100%100%

Calculated from the dashboard’s validated aggregate table in 1% steps of the 93,358 completed customers. The curve describes historical purchasing; it does not predict future customer value.

Completed purchases span September 15, 2016 to August 29, 2018. Observed item sales total 13,221,498.11 source units; AOV is 137.04 source units. Currency is unconfirmed. Item sales exclude freight and do not represent net revenue, profit, or cash collections.

A reliable foundation
for business questions.

Prepare the source records, establish explicit definitions, and independently check the results before they reach the dashboard.

The business challenge

Understand how sales change over time, which customers contribute value, when repeat purchases are observed, how acquisition cohorts return in later months, and whether second purchases stay within the same categories.

  1. Raw CSVs
  2. Cleaning
  3. SQLite
  4. SQL analysis
  5. Independent validation
  6. Aggregate datasets
  7. Power BI
  8. Final acceptance

Evidence that can be checked

Python prepares the records; SQLite and SQL organize and analyze them. Items, payments, and reviews are aggregated separately before joins to prevent duplicated totals. Monetary sums use exact integer hundredths rather than floating-point approximations.

Independent Python validation rebuilds expected results from base records. CSV readbacks check the exports, and SHA-256 comparisons verify preservation of protected inputs. Unavailable cohort observations remain distinct from measured zeros.

Technical validation notes

All four dashboard pages passed user-confirmed Desktop acceptance and final QA. The final acceptance record separately documents two pre-existing metadata schema errors and one unreachable remote visual schema warning.

Four views.
One consistent foundation.

Original captures from the accepted Power BI dashboard. Open any image at full size to inspect the detail.

Executive Overview

Connect completed-order sales, monthly trends, leading categories, and all-order operational status in one business overview.

Open full-size image (new tab)
Executive Overview Power BI report showing completed-sales KPIs, monthly item sales, Top 10 categories, order status, and coverage detail.

Customer Value & Segmentation

Compare observed purchase frequency with customer value, descriptive segments, and sales concentration.

Open full-size image (new tab)
Customer Value and Segmentation Power BI report showing one-time and repeat customers, four value segments, and customer sales concentration.

Retention & Cohorts

Separate comparable later-month cohort returns from purchase timing among customers who actually repeated.

Open full-size image (new tab)
Retention and Cohorts Power BI report showing acquisition cohorts, coverage-aware monthly returns, and conditional repeat-purchase timing.

Pooled M1 / M2 / M3 returns are 0.482% / 0.350% / 0.262%, using the same 17 eligible cohorts and 68,618 original customers. Each rate measures activity in that individual month, not cumulative retention. The 29-day median applies only to the 2,801 observed repeat customers; it is neither an all-customer repeat probability nor an optimal contact day.

Product & Category Performance

Explore the complete category results, customer-type sales mixes, and category movement between first and second orders.

Open full-size image (new tab)
Product and Category Performance Power BI report showing category sales, one-time versus repeat category mixes, and first-to-second category continuity.

51.23% of 2,801 first-to-second order pairs have no category overlap. This observed association does not establish causality or recommendation effectiveness.

The report uses nine intentionally disconnected aggregate tables. Local filters affect compatible visuals; concentration, repeat timing, and category continuity retain their documented full-history populations. These images are static captures.

From findings
to testable decisions.

The analysis identifies hypotheses for controlled testing. No intervention, revenue lift, or achieved improvement is claimed.

High-value one-time outreach

Revalidate eligibility with current data, then compare outreach with a holdout. Measure second-order incidence and sales per assigned customer over equal follow-up windows.

Post-purchase contact timing

Compare predefined contact windows with a control. Use the conditional timing distribution to inform the question, without treating the 29-day median as an optimal send date.

Cross-category recommendations

Compare relevant cross-category and same-category recommendations with a control. Keep assignment and outcome windows consistent to assess incremental impact.

Historical first-observed purchases may not be first-ever purchases. Calendar gaps, partial boundary periods, unequal follow-up, missing metadata, and timestamp ties limit interpretation. Current eligibility, exposure records, complete follow-up, and reliable costs would be needed for an intervention test.

Bring a clearer question
to your data.

Need dependable preparation, customer analysis, or reporting your team can use?

Data: Brazilian E-Commerce Public Dataset by Olist, published by Olist (olistbr) on Kaggle. Listed dataset license: CC BY-NC-SA 4.0. Analysis, dashboard, and website presentation by Riverside Data Analytics LLC.