⚡ Promptolis Original · Data & Analytics
📈 Excel Pivot Table Architect
Designs the pivot tables for your specific data + analysis goal — with the row/column/value choices, the calculated fields, and the 4 'why is my pivot wrong' bugs PivotTable users hit and don't know how to fix.
Why this is epic
Most Excel pivot tables are built by trial-and-error: drag fields around until something looks right. This Original designs them deliberately: which fields go to rows, columns, values, and filters, with the calculated fields you'll need.
Outputs the FULL pivot table spec: source data structure, pivot layout, calculated fields with formulas, slicers + timeline filters, conditional formatting rules, and the troubleshooting for the 4 most common pivot bugs (blank rows, wrong totals from blanks, dates not grouping, refresh issues).
Calibrated to 2024-2026 Excel: PivotTables, Power Pivot for >1M rows, calculated columns, the Get Data flow from external sources, and when to use Power Query as a pre-step. Picks the right tool for your data scale.
Honest about when a pivot table is wrong tool. Sometimes the answer is Power BI, a SQL query, or just a chart. The Original tells you when.
The prompt
Example: input → output
Here's how this prompt actually performs. Real input below, real output from Claude Opus 4.
<analysis-goal>I want a monthly sales report showing: revenue by product category by month, with a comparison to the same month last year, and ability to filter by region. Output goes into a PowerPoint deck for our monthly business review.</analysis-goal> <data-shape> Col A: order_id (string) Col B: order_date (date) Col C: customer_id (string) Col D: region (single select: NA, EMEA, APAC, LATAM) Col E: product_sku (string, e.g., 'SKU-001') Col F: product_category (one of: Electronics, Apparel, Home, Books, Food) Col G: quantity (number) Col H: unit_price (number) Col I: revenue (number, = G * H) Col J: discount_amount (number) Col K: net_revenue (number, = I - J) A2: ORD-1001, B2: 2026-01-15, C2: CUST-501, D2: NA, E2: SKU-001, F2: Electronics, G2: 2, H2: 199.99, I2: 399.98, J2: 0, K2: 399.98 A3: ORD-1002, B3: 2026-01-15, C3: CUST-502, D3: EMEA, E3: SKU-045, F3: Apparel, G3: 1, H3: 89.00, I3: 89.00, J3: 9.00, K3: 80.00 [8K rows total covering 2024-01 through 2026-04] </data-shape> <data-size>~8,000 rows total. Growing ~300/month.</data-size> <refresh-frequency>Monthly (5th business day of next month). Source is exported from our ERP as CSV.</refresh-frequency> <existing-attempts>Tried a basic pivot with order_date as columns (got 800+ daily columns, unusable). Tried product_category in rows + sum of revenue in values — got the right number but no YoY comparison.</existing-attempts> <excel-version>Microsoft 365 (Windows)</excel-version> <output-needs>Pivot table that I can paste-as-image into PowerPoint. Plus a chart that goes alongside. Want both updated monthly with new data.</output-needs>
Pivot Table Design: Monthly Revenue by Category with YoY Comparison
Suitability Check
Yes, a pivot is the right tool here. Your data is ~8K rows (well within Excel's comfortable range), structured as proper transaction records, and your question is multi-dimensional aggregation — exactly what pivots do best.
The MoM growth + YoY comparison is achievable with calculated fields + date grouping. No need for Power Pivot at this scale.
Source Data Prep
Your data is well-structured. Two small cleanups:
1. Convert source range to a Table (Insert → Table, Ctrl+T). Reasons: pivots auto-expand when new rows are added; you don't have to redefine source every month.
2. Verify date column type: in Col B, Excel sometimes imports dates as text. Select Col B → Format Cells → Date. If any rows show as text, use `=DATEVALUE(B2)` in a helper column or re-import with proper date parsing.
No Power Query needed for this dataset.
Pivot Layout
Insert → PivotTable → from your Table.
Field placement:
ROWS:
Product Category (the primary dimension you care about)
COLUMNS:
Order Date (grouped by Year, then Month — see grouping below)
VALUES:
Sum of Net Revenue (or Revenue if you prefer pre-discount)
FILTERS:
Region (top-of-pivot dropdown for filtering)
Why this placement:
- Categories in rows (5 categories) is readable; reversed (in columns) wouldn't fit the page.
- Time in columns lets you see month-over-month at a glance, with YoY accomplished by including 2 years.
- Region as a filter (not a row/column) keeps the table compact; you change the lens by changing the filter.
Date grouping:
- Right-click any date in the pivot → Group → check 'Months' AND 'Years' (both, in that order).
- Result: columns become 'Year ▸ Month' (2024 ▸ Jan, 2024 ▸ Feb, ..., 2026 ▸ Apr).
- This handles YoY automatically.
Calculated Fields
Add a calculated field for YoY % change.
PivotTable Tools → Analyze → Fields, Items, & Sets → Calculated Field:
Name: YoY %
Formula: (Current_Period - Same_Month_Prior_Year) / Same_Month_Prior_Year
Caveat: Excel calculated fields don't natively reference 'same month prior year' — you'd need to use GETPIVOTDATA in a separate cell, OR use the simpler approach below.
Simpler approach: use 'Show Values As' instead of a calculated field.
In the pivot:
1. Click any value cell → Right-click → Show Values As → '% Difference From'
2. Base field: Years
3. Base item: 'previous'
Result: each year's column shows % change from the previous year, automatically. No formula maintenance.
For the 'absolute revenue' AND '% change' both visible: drag Net Revenue into VALUES twice. Configure first as Sum, second as 'Show Values As: % Difference From > previous year.'
Filters + Slicers
Region filter: since region is in the FILTERS area, it's a dropdown at the top. Works fine for single-region viewing.
Add a Region slicer ALSO for visual control. PivotTable Tools → Analyze → Insert Slicer → Region. The slicer shows all 4 regions as buttons; click to filter; multi-select with Ctrl. Better UX than the dropdown.
Add a Timeline slicer for Order Date. Insert → Timeline → Order Date. Lets you scroll through periods by quarter / month visually. Useful for the BR if the leadership team wants to look at specific quarters.
Connect both slicers to the pivot: PivotTable Tools → Analyze → Filter Connections.
Conditional Formatting
If you want at-a-glance health on the YoY % column:
- Select the YoY % column cells (only — not the Sum of Revenue column)
- Home → Conditional Formatting → Color Scales → Red-Yellow-Green
- Adjust thresholds: Red <0%, Yellow 0-15%, Green >15% (or whatever makes sense for your business)
For the absolute Revenue column, conditional formatting is usually visual noise. Skip unless leadership wants it.
Number Formatting
- Sum of Net Revenue: Currency, $0,000 (no decimals — easier to read at scale)
- YoY %: Percentage, 1 decimal (e.g., 12.4%)
- Grand totals: same formatting as values
Common Pivot Bugs (and how to avoid them)
Bug 1: Wrong totals from blank rows
- Cause: if your CSV import left blank cells in Net Revenue column, pivot treats them as 0 (silently). Some 'returns' or 'exchanges' might have been blank.
- Fix: before building pivot, run a check:
=COUNTBLANK(K2:K8000)— if non-zero, investigate. Either replace blanks with 0 explicitly or with another reasonable default. - Prevention: Filter source data; verify data dictionary.
Bug 2: Dates not grouping
- Cause: If even ONE row has a text-formatted date instead of date-formatted, Excel can't group as dates. Right-click → Group is grayed out.
- Fix: sort by Order Date column → look for any cell that sorts oddly (text values sort to top or bottom). Convert to date.
Bug 3: New months not appearing after refresh
- Cause: If source data isn't a Table (just a range), pivot data source has a fixed range that doesn't expand.
- Fix: Convert source to Table FIRST (Step 1 above). Then pivot's data source = Table[name] which auto-expands.
Bug 4: 'Same Month Prior Year' doesn't actually compare same months
- Cause: if your dates aren't grouped, '% Difference From > previous year' compares the YEAR's total, not the same MONTH's prior year.
- Fix: Always group dates Month + Year (both). Then 'previous year' references the same month one year ago.
Refresh Strategy
Manual refresh (your monthly cadence):
1. Export new ERP data → CSV (probably automated)
2. Open the CSV → Copy data
3. Append to the bottom of the source Table (Excel auto-expands the table)
4. PivotTable Tools → Analyze → Refresh All
5. Verify new month appears in pivot
6. Re-paste pivot snapshot into PowerPoint
Better: automate with Power Query connection to the CSV/source. Then refresh is a 1-click 'Data → Refresh All.' Setup time: ~30 min.
For your monthly cadence, manual is fine. Automate when you start doing this weekly.
When to Migrate to Power Pivot
Stay with regular PivotTable while:
- Total rows <500K
- Single source data table
- Calculation needs are sums / averages / counts
- Refresh time tolerable (<30s for full refresh)
Migrate to Power Pivot when:
- Total rows >500K (regular pivots get slow)
- You have 2+ data tables that need to relate (e.g., Orders + Customers + Products as separate tables)
- You need DAX measures more sophisticated than calculated fields can handle
- You need to model snapshots / slowly-changing dimensions
Your projection: at 300/month growth, you'll hit 500K rows in ~140 years. You're never migrating for size. You might migrate if you add Customer + Product master tables and want a relational model.
What This Pivot Won't Do
- Cohort analysis (e.g., 'customers who first bought in Jan 2025, what's their cumulative revenue'). Requires acquisition-month derivation + cumulative measures — Power Pivot territory.
- Customer-level repeat-rate. Aggregating by customer requires customer_id in rows; different pivot structure.
- Forecasting. Pivots show the past; forecasting needs separate analysis (regression, time-series models, or Power BI).
- Real-time dashboards. Pivots are batch — refresh when you tell them. For live data, use a BI tool.
- Multi-currency. Your data is single-currency. If you add EMEA in EUR vs NA in USD without conversion, pivot sums become wrong.
Implementation Steps
1. Prep source (5 min): Convert range to Table (Ctrl+T). Verify date column.
2. Insert pivot (2 min): Insert → PivotTable → from Table → New Worksheet.
3. Configure layout (3 min): Drag fields per spec above. Group dates by Month + Year.
4. Add second Sum of Net Revenue: drag Net Revenue to Values twice. Configure second as 'Show Values As: % Difference From > Previous Year.'
5. Insert slicers (3 min): Region slicer + Order Date timeline. Connect both to pivot.
6. Format (5 min): Currency on revenue, % on YoY, conditional formatting on YoY column.
7. Test (5 min): Filter by region; verify totals make sense; pick a known month + verify YoY math by hand.
8. PowerPoint export: Select pivot range → Copy → in PowerPoint, Paste Special → Picture (Enhanced Metafile). Updates each month after refresh.
Total setup time: ~25 min. Monthly refresh + PPT update: ~10 min.
Key Takeaways
- 'Show Values As: % Difference From Previous Year' is the YoY shortcut. No calculated field needed.
- Group dates by Year + Month BOTH. Without it, YoY math is wrong.
- Convert source to a Table before pivot. Auto-expansion saves manual data-source updates.
- Use slicers + timeline (not just filter dropdowns). Better UX for monthly business reviews.
- At 8K rows growing 300/month, you'll never need Power Pivot for size. Stay with regular PivotTables.
Common use cases
- Analyst building monthly/quarterly reports from CRM or financial data
- Operations lead building dashboards from Salesforce / HubSpot exports
- Founder doing their own KPIs in Excel instead of a BI tool
- Anyone who 'wants to see X by Y by Z' and isn't sure how to set it up
- Analyst migrating from Excel pivots to Power Pivot at scale (>500K rows)
- Excel user troubleshooting a pivot that's giving wrong totals
Best AI model for this
Claude Sonnet 4.5. Pivot design is structured + bounded — Sonnet handles fluently. Opus is overkill.
Pro tips
- Always include data shape in your input. 'Sales data' could be 50 columns or 5; the pivot design depends on shape.
- PivotTables auto-handle blanks awkwardly. Use the 'For empty cells show: 0' setting to avoid 'wrong totals from blanks' bug.
- Group dates by month/quarter via the Date Group feature, NOT by adding helper columns. Cleaner + survives data refreshes.
- Calculated fields > calculated columns for derived metrics that only matter in the pivot. Calculated columns add row-level data that lives forever in the data table.
- Slicers are interactive filters that connect to multiple pivots. Use them when you have 2+ pivots that should filter together.
- Pivot 'wrong totals' usually = SUM of pre-aggregated data. Always pivot from raw transaction data, not from a summary.
- For >500K rows, switch to Power Pivot (Excel's data model). Regular pivots will slow + lock memory.
Customization tips
- ALWAYS paste actual data shape with 5-10 rows + headers. Pivot design depends on the data structure; abstract descriptions produce abstract pivots.
- Specify what 'right answer' looks like. The pivot is calibrated to deliver YOUR specific question, not a generic 'show me sales.'
- Mention if you've already tried something. The Original can usually fix existing pivots in 1-2 small adjustments rather than redesigning from scratch.
- Specify Excel version. PivotTable features differ slightly across versions (Microsoft 365 has features Excel 2019 doesn't).
- Be honest about data size. Pivots <500K rows: regular PivotTable. >500K: Power Pivot. Different design patterns.
- Use the Power Pivot Mode variant if you have multiple related tables (Orders + Customers + Products) and want a relational model — adds DAX measure design.
Variants
Sales / Revenue Reporting Mode
For revenue analysis — emphasizes time-series patterns, cohort logic, and revenue-recognition awareness.
Operations / KPI Mode
For operational reports — emphasizes status counts, percentages, conditional formatting for at-a-glance health.
Financial Statement Mode
For finance — emphasizes account hierarchies, period comparisons (YoY, QoQ), and variance analysis.
Power Pivot Mode
For >500K rows or multi-table relationships — designs Power Pivot data model with DAX measures.
Frequently asked questions
How do I use the Excel Pivot Table Architect prompt?
Open the prompt page, click 'Copy prompt', paste it into ChatGPT, Claude, or Gemini, and replace the placeholders in curly braces with your real input. The prompt is also launchable directly in each model with one click.
Which AI model works best with Excel Pivot Table Architect?
Claude Sonnet 4.5. Pivot design is structured + bounded — Sonnet handles fluently. Opus is overkill.
Can I customize the Excel Pivot Table Architect prompt for my use case?
Yes — every Promptolis Original is designed to be customized. Key levers: Always include data shape in your input. 'Sales data' could be 50 columns or 5; the pivot design depends on shape.; PivotTables auto-handle blanks awkwardly. Use the 'For empty cells show: 0' setting to avoid 'wrong totals from blanks' bug.
Explore more Originals
Hand-crafted 2026-grade prompts that actually change how you work.
← All Promptolis Originals