BUSINESS INTELLIGENCE PORTFOLIO PROJECT

Retail Profitability &
What-If Planning

I used SQL and Tableau to compare category and product profitability, then test how changes in price, unit cost, and sales volume would affect gross profit.

Fernanda Adekeu Alif  ·  SQL / DuckDB / Tableau

Fictional Contoso data  ·  USD transactions  ·  Featured analysis: 2025

From sales records to useful decisions

I wanted to go beyond reporting sales totals. This project looks at which categories and products contribute to gross profit, and how sensitive that profit is to changes in commercial assumptions.

I prepared 113,614 sales order lines from the fictional Contoso dataset, keeping only USD transactions. Each row represents an order line. I used the historical net unit price and unit cost recorded in the transactions, then built three Tableau dashboards from the prepared data.

The prepared dataset includes multiple years. The findings and figures featured on this page use 2025, with all categories selected unless stated otherwise.

2025 at a glance

USD transactions · All categories

$12.18MRevenue
$6.82MGross profit
56.0%Gross margin
6,535Distinct orders

Revenue and gross profit are rounded here. Gross margin is total gross profit divided by total revenue.

Three findings worth looking at

01 / CATEGORY PERFORMANCE

Computers contributed 36.1% of gross profit

The category generated $2,460,913.02 in gross profit. Its top 10 products accounted for 16.49% of the category's gross profit across 592 products with sales, so most of its contribution came from the wider product range.

02 / PRICE SCENARIO

A 5% price increase added $608,812.52

With unit cost and volume unchanged, scenario gross profit rose from $6,817,301.33 to $7,426,113.85. This is a modelled result, conditional on maintaining the same volume and product mix.

03 / VOLUME SENSITIVITY

About an 8.2% volume decline removed that gain

Under the same price increase, gross profit stayed above baseline with a 5% volume decline, but fell below it with a 10% decline. The break-even point was about 8.2%; it is not a forecast of customer demand.

Three dashboards, one analysis

Start with the Financial Overview, explore individual products in the Profitability Explorer, then test your own assumptions in the What-If Planner.

Financial Overview for 2025 and all categories, showing revenue, gross profit, gross margin, orders, monthly revenue, and category gross profit.

Financial Overview

Revenue, gross profit, gross margin, and orders, with monthly trends and category comparisons.

Open full screenshot →
Profitability Explorer with year, category, and metric controls, a category bar chart, and a product profitability table.

Profitability Explorer

Compare categories and inspect product revenue, gross profit, and gross margin.

Open full screenshot →
What-If Planner at the 2025 baseline, with price, unit cost, and volume controls set to zero and scenario gross profit of $6,817,301.33.

What-If Planner

Change price, unit cost, and volume assumptions, then compare scenario gross profit with the baseline.

Open full screenshot →

Try the interactive dashboards

Use the workbook tabs to switch dashboards. A larger screen is best for the product table and scenario controls.

Explore the Tableau workbook

Filter the year and category, compare products, or try a different pricing scenario.

Why volume matters in a pricing decision

The table below keeps price at +5% and unit cost unchanged, then varies volume. All three cases use 2025 USD transactions and keep the product mix constant.

Baseline gross profit: $6,817,301.33
Volume changeScenario gross profitChange vs baseline
0%$7,426,113.85+$608,812.52
−5%$7,054,808.16+$237,506.83
−10%$6,683,502.46−$133,798.87

For me, the useful result was the trade-off: a higher price can improve gross profit, but the benefit depends on how much volume is retained. This model does not estimate how customers would actually respond.

Preparing, checking, and presenting the data

  1. Prepared the fictional Contoso tables in DuckDB and filtered the sales data to USD transactions.
  2. Joined the required data at sales order line level, checking keys, missing values, and row counts.
  3. Calculated revenue, COGS, gross profit, gross margin, and distinct order counts using consistent definitions.
  4. Exported the prepared data and built the Financial Overview, Profitability Explorer, and What-If Planner in Tableau.
  5. Compared dashboard totals with SQL reference results and checked the filters, scenario controls, and reset behaviour.
  6. Used additional SQL analysis to examine product concentration and the volume break-even point.

What these results can tell us

This is an independent portfolio project using fictional data, rather than a report of a real company's performance. I kept USD transactions only and did not convert other currencies.

The planner applies uniform price, unit cost, and volume changes to the selected products. It keeps the product mix constant and does not model customer demand or inventory constraints. Gross profit excludes operating expenses and taxes.