Categories and numbers in one table: how many rows do you need?

The question behind the upload

You export a table from your CRM or your operations system. Some columns are numbers: deal size, days to close, tickets per week, order value. Others are categories: region, sales rep, plan, channel, warehouse, month. You upload it, and a reasonable question comes up first: is this enough rows?

It depends less on how many columns you have and more on how many values your category columns have. Here is why, what we measured, and what to do before you upload.

Same effect everywhere vs. different effect per group

There are two kinds of relationships in a mixed table, and they need very different amounts of data.

The same effect in every group. Say a longer onboarding call goes with a higher renewal rate, and that holds roughly the same way in every region and on every plan. Every row in your file helps confirm it. This is the easy case. On mixed data shaped like a typical CRM export (50 columns, 21 of them categorical, 7,000 rows), DAGsight finds effects like this well.

A different effect per group. Now say the onboarding call matters a lot in one region and barely at all in another, and differently again on each plan. To see that link, the data has to show the pattern inside each combination of region and plan. Rows in one combination don't help much with another, because the relationship there is different.

That second case is where row counts start to matter.

Why combinations add up fast

When a relationship differs between groups, the number that matters is how many combinations your category columns make, and how many rows land in each.

Take two category columns, one with 31 values and one with 24. Together they make 31 × 24 = 744 combinations. With 5,000 rows, that is about 7 rows per combination, on average. Some combinations will have more, many fewer. Seven rows is not much to show a pattern of its own. Add a third many-valued column and the combinations multiply again. A table can feel big and still be thin for this question.

A grid of 31 zones by 24 hours makes 744 combinations; with 5,000 rows each gets about 7 rows on average, and about 22,000 rows would give each about 30.

What we measured

We tested this on a published benchmark network built from air-quality and weather records. It mixes categories, including a zone column with 31 values, a station type with 6, a year with 20, plus month and hour (24 values), with numeric measurements. It has 71 true links, and it is built so that each numeric variable's relationship to the others is different for every combination of its category parents. In other words, it is the hard case above, on purpose.

Rows True links found (of 71) Share found
5,000 28 about 40%
20,000 37 about 52%
50,000 43 about 60%

Bar chart: 28 of 71 true links found at 5,000 rows (about 40%), 37 at 20,000 (about 52%), 43 at 50,000 (about 60%); about 85% of drawn links were real at every size.

Two things to take from this:

So a thin dataset of this kind gives you a shorter map, not a wrong one. A drawn link is worth testing; a missing link is weak evidence that nothing is there.

The rule of thumb DAGsight uses

Before a run, DAGsight looks at the two category columns with the most values and multiplies their counts. If your file leaves fewer than about 30 rows per combination, you get a warning, along with a suggested row count: combinations × 30.

For the 31 × 24 example, that means 744 × 30, or roughly 22,000 rows.

Treat 30 as a floor, not a guarantee. In the benchmark above, even 50,000 rows found about 60% of the true links. The warning tells you when you are clearly below the level where group-specific patterns can show up. It doesn't promise that everything will be found above it.

What actually helps

For effects that differ by group, the fix is more rows. In the benchmark, that is what moved the numbers: 5,000 to 20,000 to 50,000 rows took the share of true links found from about 40% to about 52% to about 60%. If you can export a longer history or more of your records, do that first, and use the row count from the warning as your target.

It is tempting to merge groups instead, say cities into regions, to get more rows per combination. For this problem it doesn't work: if an effect really is different in each group, merging the groups averages that difference away instead of revealing it. Merge categories only when the merged version is what you actually want to analyse, not as a way around too few rows.

Two habits help regardless of row count:

And keep the other half of the picture in mind: effects that are the same in every group are found well even at modest row counts. A warning about combinations is about the group-specific links, not a verdict on the whole result.

A short checklist

  1. Count the values in your two most varied category columns and multiply them.
  2. Divide your row count by that number. Below about 30 per combination, expect missed links where effects differ by group.
  3. If you can, add rows. Drop ID columns and keep dates as dates either way.
  4. Read missing links as "not shown by this data", not as "no effect".
  5. Confirm the links you plan to act on with an experiment.

The full list of what DAGsight assumes, and where it is weaker, is on the assumptions and limits page.

Try it on your own export

Upload your CRM or operations export as a CSV. If the categories are too many for the rows, DAGsight tells you before the run starts and suggests how many rows would help. Free tier, 10 runs, no card: dagsight.com.