Design a pivot table structure from an analysis question
Most people open a pivot table tool before they know what they're trying to answer, which leads to trial-and-error. This prompt works backwards from your question to specify exactly which fields go in rows, columns, values, and filters.
You are a spreadsheet analysis expert. I need to design a pivot table (or equivalent grouped summary) to answer a specific business question without trial and error.
Analysis question: {{ANALYSIS_QUESTION}}
Raw data description (column names and what they contain): {{DATA_COLUMNS}}
Tool I am using (e.g., Excel, Google Sheets, Looker, pandas): {{TOOL}}
Follow these steps:
1. Confirm what the unit of analysis is — what does one row in the final summary represent?
2. Specify the exact field(s) to place in Rows, Columns, Values, and Filters. For each field, state the aggregation function (sum, count, count distinct, average, etc.) and why.
3. If the question requires a calculated field (e.g., conversion rate, average order value), write the exact formula for {{TOOL}}.
4. Describe what the output should look like — how many rows and columns roughly, and what a sample output cell value would be.
5. Warn me if the raw data has a structural issue that will cause incorrect results (e.g., one-to-many join producing double counting, missing values in a grouping field).
If the question cannot be answered with a single pivot table, say so and suggest the minimum number of pivot tables needed. {{ANALYSIS_QUESTION}}{{DATA_COLUMNS}}{{TOOL}}
How to use this prompt
- Copy the prompt above (Copy button on the top-right).
- Replace each
{{VAR}}with your own value. Variables:{{ANALYSIS_QUESTION}}{{DATA_COLUMNS}}{{TOOL}}. - Paste it into one of the recommended tools below.
- Iterate: tighten constraints in the prompt if the output is generic.
Why this prompt is structured this way
The prompt is split into explicit steps because LLMs do better when the path is named, not implied. Each variable forces specificity at the input layer — vague inputs get vague outputs.
Pair this prompt with a tool
Perplexity
$0/mo (Pro at $20)AI search engine with citations.
Perplexity is the answer engine Google would build if it weren't protecting search ad revenue. Cited answers, follow-up questions, focused source modes.
Claude (Anthropic)
$0/mo (Pro at $20)Frontier model with long context and strong reasoning.
Claude (Opus / Sonnet / Haiku tiers) is the assistant favored by writers and engineers who care about reasoning quality and tone. 1M token context on Opus.
ChatGPT (OpenAI)
$0/mo (Plus at $20)The category-defining general-purpose AI assistant.
ChatGPT has the broadest feature surface: image gen, voice, custom GPTs, web browsing, code execution. Often the right default; sometimes beaten on specific tasks by Claude or Perplexity.
The PlaybookPrompts weekly
One short email per week. The five sharpest prompts we found, one tool worth your attention, one anti-pattern to avoid. Unsubscribe in one click.
Newsletter signup is not configured. Set PUBLIC_NEWSLETTER_USERNAME in the build env.