Portfolio project · SQL, Power BI, Excel · Advanced · 14 to 20 hours

Monthly KPI report with SQL and Power BI

Most analyst jobs include a recurring report. This project shows the whole chain: SQL that pulls the numbers at the right grain, a Power BI or Excel report that refreshes for a new month, totals that reconcile, and three lines of commentary that say what changed and why.

The business question

How did revenue, orders, average order value and return rate move this month, against last month and the same month last year, and why?

Turned into a SMART goal, so you know when you are done and a reviewer can see you scoped it like an analyst:

Specific
Four KPIs by channel and category for the latest complete month.
Measurable
Each KPI against the prior month and the same month last year; report totals reconcile to the database.
Achievable
One SQL database, a few saved queries or views, and one report file that refreshes.
Relevant
Leadership reads it early each month to decide where to look more closely.
Time-bound
A new month refreshes in under 15 minutes. First version in three weeks.

Datasets

Public data, free to download. Pick one, read its license on the source page, and link that page in your README rather than uploading the files.

Microsoft Learn

AdventureWorks sample databases

Microsoft’s sample database for a fictional bicycle company: sales orders, products, customers and territories, as SQL Server backups and install scripts.

The data warehouse version (AdventureWorksDW) is already a star schema, which suits Power BI. The regular (OLTP) version gives you more SQL to write.

Google BigQuery public datasets

theLook eCommerce

Orders, order items, products and users at bigquery-public-data.thelook_ecommerce. Power BI has a BigQuery connector, or you can export the monthly table to Excel.

It is synthetic data. Use it to show the pipeline and the checks rather than claims about a real business.

Kaggle

Brazilian E-Commerce Public Dataset by Olist

Load the CSVs into DuckDB, SQLite or PostgreSQL, write the monthly queries there, and report from the result.

The last months of the data are thin. Pick a reporting month with full data and say why.

Step by step

Each step links to AnalystQuest levels that teach the skill on the Harbor & Pine store data, so you can practise it before you do it on the real dataset.

  1. Write the KPI definitions

    One line per KPI: the formula, the filters (which statuses, with or without shipping), and the grain it is counted at. The report month is the last complete month, never the current partial one. Every later step points back to this sheet.

  2. Pull the data with SQL

    Write one query per grain: an order-level table and an order-line table, each aggregated before you join them, so shipping fees or order counts are not repeated on every line. Save the result as a view or a summary table the report reads from.

  3. Compare months the right way

    Use LAG over a monthly series for month-over-month change, and compare with the same month a year earlier to take out the season. Check that both months you compare are complete.

  4. Build the report that refreshes

    Connect Power BI or Excel to the view through Power Query, so a new month is a refresh, not a rebuild. Lay out a KPI block (value, against last month, against last year), a 13-month trend, and a channel and category table. No hard-coded months anywhere.

  5. Reconcile, then comment

    Before you publish, check the report totals against a direct query on the database and note the result. Then write three lines of commentary: what moved most, the likely reason with a number behind it, and what you would look at next.

What to show

The same project, packaged three ways. Numbers in brackets are placeholders: replace them with your own results.

GitHub

README, in this order

  1. What the report answers and who reads it
  2. Report screenshot
  3. KPI definitions
  4. Data flow: database, views, report
  5. Reconciliation result
  6. How to refresh for a new month
  7. Sample commentary

Files

  • sql/views.sql: the views the report reads from
  • sql/checks.sql: reconciliation queries
  • report/monthly_report.pbix or .xlsx: the report file
  • docs/kpi-definitions.md: formulas, filters and grain
  • images/report.png: the screenshot for the README

LinkedIn

Post outline

  1. Open with what it saves: "A monthly report that refreshes in [10] minutes."
  2. One line on the stack: SQL views feeding Power BI.
  3. The bug the reconciliation caught (there is usually one).
  4. A sample of the three-line commentary.
  5. Screenshot and repo link; ask what others put in a monthly pack.

CV

Two bullets

  • Built a monthly KPI report (revenue, orders, AOV, return rate) on [AdventureWorks] with SQL views and Power BI; a new month refreshes in [10] minutes.
  • Wrote month-over-month and year-over-year comparisons with window functions and reconciled every total to the database within [0.1]%; the commentary flagged [a 12% drop in X].

Start with a verb, include a number, and name the tool. Every number must be one you can explain in an interview.

Write-up template

Copy it into your README or a document and replace each bracket. Keep the executive summary to what a busy manager would read.

# [Project title]: monthly KPI report

## Executive summary
[Month]: revenue [value] ([+x]% vs last month, [+y]% vs [month last year]).
[The one change leadership should know about, and its likely cause.]

## Objective
How did revenue, orders, AOV and return rate move in [month], against last month and the same month last year, and why? Audience: [leadership]. Refreshed monthly.

## Data and limits
Source: [database, link]. Tables: [..]. Report month: [last complete month].
Reconciliation: report revenue [value] vs database [value] (difference [x]%).
Limits: [e.g. returns recorded late, so last month's return rate will rise].

## Method
KPI definitions in docs/kpi-definitions.md. SQL views at order and line grain, aggregated before joining. MoM with LAG; YoY against the same month last year.

## Findings
1. [Biggest mover, with numbers.]
2. [Channel or category behind it.]
3. [Anything unusual and whether it is real or a data issue.]

## Recommendations
[Where to look next, or one action.]

## Next steps
[e.g. automate the refresh, add a target line, add a drill-through page.]

Common mistakes

  • Comparing a partial current month with a full previous one.
  • Joining orders to order lines before aggregating, which repeats shipping fees and inflates revenue.
  • Defining a KPI one way in SQL and another way in the report.
  • Hard-coding the month in a query or a measure.
  • Publishing without reconciling to the database.
  • Commentary that restates the numbers instead of explaining them.

How long it takes

About 14 to 20 hours for a first version, spread over one to three weeks of evenings.

Definitions
1 to 2 hours
SQL views
4 to 5 hours
Comparisons
2 to 3 hours
Report
4 to 6 hours
Reconcile and comment
2 to 3 hours

Other portfolio projects

Excel, Power BI · 10 to 13 hours

E-commerce sales dashboard

One page a head of sales can read in a minute: revenue, orders, average order value and where they moved.

SQL, pandas · 12 to 16 hours

Customer cohort retention analysis

Do first-time buyers come back? Monthly cohorts and a retention grid, built in SQL and checked in pandas.

Python, Statistics · 8 to 12 hours

A/B test analysis and write-up

Check the split, estimate the lift with a confidence interval, and write a decision a product manager can act on.

Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.