Data Analytics

Pivot Table Report Generator

Summarize and analyze large datasets with dynamic pivot tables and cross-tabulations

Get this built around your data

✓ Free to download  ·  ✓ Excel 2016+ and Google Sheets  ·  ✓ Custom version in 24h

Most pivot table problems are not pivot table problems. They are shape problems: data stored wide, with months as columns and subtotals mixed into the rows. This template does the unpivoting first, then the pivot works.

What the worksheet looks like

The actual columns, with sample rows

After reshaping: one row per observation, which is the only shape a pivot can use.
ABCDEFG
1DateRegionProductRepUnitsRevenue
22026-07-03EUStandardA. Duval123,600
32026-07-03EUPremiumA. Duval42,800
42026-07-04NAStandardK. Owens92,700
52026-07-04NAPremiumK. Owens74,900

The formulas that do the work

Why each one is written the way it is

  • Power Query: Select month columns → Unpivot Columns The single most useful transformation in reporting. Twelve month columns become two: attribute and value. Everything downstream gets simpler.
  • =FILTER(Raw, (Raw[Type]<>"Subtotal")*(Raw[Region]<>"")) Strips subtotal rows and blank separators before the data reaches the pivot — the two things that silently double-count.
  • =TRIM(CLEAN([@Key])) Removes trailing spaces and non-printing characters. Keys that look identical but do not match are almost always this.
  • =SORT(UNIQUE(Data[Region])) A spilled distinct list for validation dropdowns, so new categories cannot be typed inconsistently.

Why the totals were 6% out

A worked example with real numbers

A sales report built on a monthly export never tied back to the accounting system, always by a few percent. The export included quarterly subtotal rows styled like data. The pivot summed them alongside the detail, double-counting one month in three. Filtering rows where the type column was blank removed the discrepancy entirely — and the same filter has caught two format changes in the export since.

What is in the workbook

Tab by tab

Every tab in the workbook and what it is for.
TabContents
RawThe export exactly as received, never edited.
CleanUnpivoted, trimmed and filtered — the pivot source.
PivotPre-built pivots by region, product and period.
ChecksRow counts and totals reconciled against the source.
READMEThe transformation steps, in order, and why each exists.

Features and related templates

What is included, and what to look at next

What it does

  • Dynamic pivot tables
  • Cross-tabulation
  • Data aggregation
  • Custom calculations
  • Filtering options
  • Conditional formatting
  • Chart generation
  • Data refresh

Need it adapted?

  • Built around your own data and column names
  • Connected to your source system
  • Delivered within 24 hours

Questions about this template

Specific to this workbook, not generic

Why can't I pivot my data as it is?

Almost always because it is wide rather than long. A pivot needs one row per observation with each attribute in its own column. Months across the top means the pivot cannot group by date.

What is unpivoting?

Turning columns into rows. Twelve month columns become a Month column and a Value column, so date becomes a dimension you can group, filter and compare by.

Do I need Power Query?

For a one-off, no — TOCOL or a helper-column approach works. For anything you refresh, yes: Power Query replays the transformation on new data instead of you redoing it.

"This pivot table generator has transformed our data analysis process. We can now create complex reports in minutes instead of hours."

- Sarah K., Business Analyst