Reporting
Packaging the Analysis for People Who Will Act on It
Reporting is where analysis becomes communication. The numbers, charts, and comparisons from the previous steps are assembled into a structured artifact — a dashboard, a slide deck, or a written report — designed for a specific audience and a specific decision. A good report is not a data dump; it is concise, leads with the metrics that matter, and ends with a recommendation someone can act on.
Reporting consolidates the analysis into one artifact built for a specific audience and decision.
Know the Audience First
- Executives want the headline, the trend, and the recommendation — one screen, no clutter.
- Operational teams want detail they can act on — by region, by SKU, refreshed often.
- Analysts want the methodology and the ability to drill down into the underlying data.
Anatomy of a Good Report
- Headline metrics (KPIs) at the top — the few numbers that define success.
- Trend and comparison visuals that give those numbers context.
- A short narrative: what happened, why, and what to do about it.
- Supporting detail for those who need to dig deeper, kept out of the main flow.
In Python — a summary table for the report
Python · pandas
import pandas as pd
# One consolidated summary table by region and category
summary = (orders.groupby(["region", "category"])
.agg(sales=("sales", "sum"),
profit=("profit", "sum"),
orders=("order_id", "nunique"))
.assign(margin=lambda d: (d["profit"] / d["sales"]).round(3))
.sort_values("sales", ascending=False)
.reset_index())
# Headline KPIs for the top of the report
kpis = {
"total_sales": orders["sales"].sum(),
"total_profit": orders["profit"].sum(),
"overall_margin": orders["profit"].sum() / orders["sales"].sum(),
}
# Export the table for a dashboard or document
summary.to_html("report_summary.html", index=False)
print(kpis)
In SQL — a roll-up with subtotals
SQL
-- GROUPING SETS produces detail rows AND subtotals in one pass,
-- exactly what a report's summary table needs.
SELECT
region,
category,
SUM(sales) AS sales,
SUM(profit) AS profit
FROM orders
GROUP BY GROUPING SETS (
(region, category), -- detail
(region), -- per-region subtotal
() -- grand total
)
ORDER BY region, category;
Tools Commonly Used
- Python: Pandas
groupby.agg,Styler,to_html/to_excel; Jupyter notebooks. - SQL:
GROUP BY GROUPING SETS,ROLLUP,CUBEfor subtotals. - BI: Power BI and Tableau dashboards; presentation tools for executive decks.
Best Practices
- Lead with the answer, not the methodology — put the recommendation where it will be read.
- Keep one idea per chart; resist the urge to crowd a dashboard.
- State assumptions, the date range, and data freshness so the report is trustworthy.
- Automate recurring reports so the numbers are always current and never hand-copied.
Example: The Retail Performance Report
For the retail dataset, the report might consist of:
- Three KPI cards: total sales, total profit, and overall margin, each with a YoY delta.
- A sales-by-region-and-category table with subtotals.
- A short narrative flagging the one region that is growing revenue while losing margin.