CSV counts or sums across two columns

Analysts can use two CSV columns to count occurrences or add values when they need a compact view of the resulting groups.

Summarize a CSV table by counting or adding values using two columns, bringing the resulting groups into a clearer view for review.

How to use

  1. On the first line, type the name of the column that should become the rows of your pivot.
  2. On the second line, type the name of the column that will supply the column headings.
  3. On the third line, give the column to add up, or leave that line empty to count rows instead.
  4. Below the separator, paste the full CSV including its header, then run the cross-reference.
  5. Check the grid of results, and copy it into a spreadsheet if you need charts or further formatting.

Example

A sales export with the columns region, category and amount. Cross-referencing region as rows, category as columns and amount as the value line gives one total per region and category, which reads far faster than a long list of individual sales lines.

Input

region
category
amount
--
region,category,amount
North,Drink,12
South,Drink,8
North,Meal,20

Limits and formats

Where processing happens

The cross-reference is carried out entirely inside your browser, even when you import a CSV file. Your sales rows therefore stay on your own device and are not passed on anywhere.

Frequently asked questions

How do I get a count instead of a sum?

Leave the third instruction line empty. The tool then counts how many rows fall into each combination of a row value and a column value, instead of adding figures together.

Why is my pivot table empty?

Usually a column name is misspelled or has an extra space compared with the CSV header. Check the exact spelling of every label you typed on the instruction lines.

Can I cross-reference more than two columns at once?

No, the tool expects one row criterion and one column criterion. For a third level of detail, split the file first or run another cross-reference on a subset of the rows.

Tools in the same category