Solutions
Experience measurement
Track sentiment and KPIs with AI-driven gap analysis
Strategic & foundational discovery
Uncover market whitespace with AI-led foundational studies
Journey & behavioral research
Connect user actions to motivations across the lifecycle
Market & consumer Insights
Understanding markets, audiences, & opportunity
Concept & prototype testing
Test designs and prototypes with rapid feedback
Agents
Design
Structure rigorous studies
Field
Run adaptive studies at scale
Synthesize
Turn results into research reports
Deploy
Email, link, and panels
Distribute studies to external audiences
Web apps and websites
Embed studies in web experiences
Mobile apps
Embeds studies in iOS and Android apps
Customers
Community
Events
Join curated gatherings shaping the future of research
Blog
Insights on AI, research, and product experience
Pricing
Sign in
Book a demo
Sign in
Book a demo
Guide

Cross-Tab Analysis with Claude: Coding Open-Ended Responses Into Themes

July 15, 2026

By The Sprig Team

Example H2
Example H3
Example H4
Example H5
Example H6

Introduction

To cross-tab an open-ended survey question, Claude and ChatGPT first reads every response and sorts it into 5–8 recurring themes, then cross-tabs those themes against your segments (plan tier, company size, etc.) the same way you'd cross-tab a rating or a yes/no answer. This guide gives you the exact prompt, a worked example on a synthetic 300-response dataset, and the two checks that catch the most common error: miscounting how many segment comparisons have too little data to trust.

Note: The example dataset is synthetic — 300 fabricated survey responses about AI use in the workplace. It is not real Sprig customer or employee data.

How Is Theming Different From a Regular Cross-Tab?

A regular cross-tab compares an outcome you already have — a rating, a plan tier, a yes/no — across groups. Theming is the extra step required when your outcome doesn't exist yet: open-ended text like "what's your biggest frustration" has to be read and sorted into categories before it can be compared to anything.

That sorting step, called theming or coding, is what makes this version harder. It requires judgment calls — deciding which responses belong together — that a pre-built attribute never requires. Once the theme column exists, the cross-tab itself works exactly like the attribute-based version.

When Should You Use Theming Instead of an Attribute-Based Cross-Tab?

Use theming when your question has no pre-built answer to compare — things like "what's stopping people from doing X" or "what do you wish we'd build next" only exist as open text until someone reads it and finds the patterns.

If you already have a rating, a tier, or another existing attribute, skip theming. Use the attribute-based cross-tab prompt instead — it's faster and involves fewer subjective calls.

| | Attribute-based cross-tab | Themed cross-tab | |---|:---:|:---:| | Starting point | A column you already have (rating, tier, plan) | Open-ended text with no category yet | | Extra step required | None | Read responses, create 5–8 themes | | Judgment involved | Low | Higher — theme boundaries are subjective | | Speed | Faster | Slower |

How Does Theming Work?

Theming works in four steps: read every response, group them into a small set of themes, assign one theme per response, then cross-tab.

  1. Read all non-blank responses to the open-ended question.
  2. Identify the 5–8 recurring themes that capture most of what people said. Anything that doesn't fit goes into an "Other/unclear" bucket rather than being forced into a theme it doesn't match.
  3. Assign each response to exactly one best-fitting theme.
  4. Cross-tab the theme variable against your segments — the same comparison you'd run on a rating or plan tier.

What's the Prompt for a Themed Cross-Tab?

Copy the prompt below and replace the bracketed sections with your own column names. It requires Code execution and file creation to be turned on in Claude or ChatGPT settings — under Settings > Capabilities for Free, Pro, and Max accounts (on by default for Team and Enterprise). Without it, step 3's "use code, not estimation" instruction won't hold.

If your data already lives in Sprig, connect via Sprig MCP instead of exporting a CSV — it pulls live surveys, responses, and themes directly into Claude or ChatGPT.

I have a survey dataset with open-ended text responses and demographic or segment/attribute variables. I want to run a themed cross-tab analysis on [OPEN-ENDED QUESTION COLUMN].

What this prompt does:

- Reads open-ended responses and sorts them into a manageable set of recurring themes

- Cross-tabs those themes against the segments you specify, and checks whether any segment has enough responses to draw a real conclusion

  from

What it returns:

- A list of themes with example quotes, so you can check the coding before trusting it

- A table of theme counts and percentages, broken out by segment

- A list of any segment comparisons that don't have enough data to trust

- A plain-language summary of the differences worth paying attention to

- A saved image of the table you can download and reuse

Please:

1. Read all non-blank responses in [OPEN-ENDED QUESTION COLUMN] and identify the 5-8 recurring themes that best capture the range of answers. This is a column header from your data file, exactly as it appears in the header row, like `biggest_barrier` or `open_feedback`, not a spreadsheet cell reference or column letter. Use an "Other/unclear" bucket rather than forcing every response into a theme.

2. For each theme, give me 2-3 example quotes or paraphrases so I can sanity-check the coding, plus the exact count and percentage of responses in that theme, excluding blanks.

3. Assign each response to its single best-fitting theme as a new column. Use code, not estimation, to do the counting.

4. Cross-tab the theme variable against these segment variables: [LIST YOUR SEGMENT VARIABLES, e.g., plan tier, company size, usage frequency]. These are also column headers from your data file, not spreadsheet cell references. Show counts and row percentages for each.

5. Flag any cross-tab cell with fewer than [N, e.g., 10] respondents. A cell with ZERO respondents also counts as under the threshold, not just small nonzero counts. Report the total flagged as a single number computed directly from the full table, not calculated in parts and combined.

6. Before giving me the final answer, recompute every number you're about to report directly from the underlying table one more time, using a genuinely different method than you used the first time, for example a manual count instead of a formula-based one. Simply re-running the same calculation again doesn't count as a check. Correct anything that doesn't match rather than keeping your first-draft number.

7. Summarize 2-3 patterns, and be explicit about which differences look meaningful versus likely noise given sample size. Don't overstate findings from a small dataset.

8. Save the table itself as an image file I can download, formatted so it's easy to read at a glance.

How Do I Customize This Prompt for My Survey?

Three settings in the prompt should change based on your sample size and how you want themes grouped:

  • Number of themes (step 1): Default is 5–8. Use fewer for a small response set; go up to 10–12 for a long, varied set before categories start losing meaning.
  • Thin-cell threshold (step 5): Default is 10 respondents. Drop to 5 for a small pilot study; raise to 20–30 for a large-scale survey.
  • Theme boundaries: If a theme groups things you'd keep separate — say, "lack of training" and "lack of time" lumped together — check the example quotes, tell Claude or ChatGPT the exact split you want, and ask it to recode using your categories.

What Does a Themed Cross-Tab Output Look Like?

On a 300-response test set, 196 people answered the "biggest barrier to using AI more" question. Claude or ChatGPT sorted those into eight themes, including IT/budget restrictions, distrust of the tool's output, and not seeing a need for it yet.

Key finding: People at companies with no formal AI policy were nearly twice as likely to say "no real barrier" (23.1%) as people at companies with a policy (9.3%) or unsure one existed (9.3%). This matches a separate finding from the attribute-based version of the same analysis: no-policy companies also have the lowest AI usage rates in the survey. People who haven't engaged with AI tend to report no barrier at all, rather than naming a specific one.

Data density check: 8 themes × 3 policy groups = 24 total comparisons. With only 196 coded responses spread across them, 14 of those 24 cells fell below the 10-respondent threshold and were flagged. That's not a flaw — it's the prompt correctly telling you which numbers to act on and which to ignore.

How Do I Sanity-Check the Output?

Run three checks before trusting any themed cross-tab: confirm theme counts sum to your total coded responses, manually filter and spot-check at least one segment cell, and treat any small-sample comparison as unreliable even if the prompt didn't flag it.

Why this matters — a real error we caught: On an early test run, Claude or ChatGPT correctly counted cells with 1–9 respondents and separately counted cells with exactly zero, but only reported the first count as the total, dropping the zero-count cells from the sum. Neither individual count was wrong; the error was in combining two correct numbers into one final total.

The fix: the prompt now states explicitly that a zero count also counts as "too few" (step 5), and requires an independent recompute using a genuinely different method before finalizing (step 6). On a rerun with those instructions, Claude or ChatGPT caught the identical mistake on its own.

The more themes you cross against more segments, the more of your table will land in unreliable territory — that's a property of your sample size, not a sign the method failed.

FAQ

How is this different from the attribute-based prompt? The attribute-based prompt compares something you already have, like a rating or plan tier. This prompt creates that comparable category first — by reading open text and sorting it into themes — then runs the same cross-tab.

Do I need to know how to code to use this? No. Paste the prompt into a conversation with your data file attached to write and run the analysis. You only edit the bracketed placeholders with your own column names and settings.

How many themes should I ask for? 5–8 for most surveys. Use fewer for small datasets, up to 10–12 for long, varied response sets.

What if most of my cross-tab cells come back flagged as too thin? You're crossing too many categories for your sample size. Combine segments into broader groups, combine themes, or collect more responses before rerunning that comparison.

Can I trust the numbers without checking them myself? No. The built-in verification (steps 5–6) catches a lot, including the exact miscount described above, but it's a safety net, not a guarantee. Spot-check at least one number before publishing or presenting.

Can I use the dataset from this guide for my own testing? No. It's synthetic and built only to illustrate this prompt. Use your own survey data with the template above.

Back to top
Solutions
Experience measurementStrategic & foundational discoveryJourney & behavioral researchMarket & consumer insightsConcept & prototype testing
Agents
DesignFieldSynthesize
Deploy
Email, link, and panelsWeb apps and websitesMobile app
Pricing
Community
EventsBlogGuides
CustomersIntegrationsCompare
Company
About usCareersService agreementPrivacy policyData addendumSystem status
Socials
LinkedInX