How to Create a Crosstab in Google Sheets

Creating a crosstab in Google Sheets is a great way to visualize and analyze data by organizing it into a compact table format. You can create a crosstab using the "Pivot Table" feature in Google Sheets. Here's how:

  1. Open your Google Sheets document or create a new one.
  2. Click on a cell in your data range, or select the entire data range you want to use for the crosstab.
  3. Click on "Data" in the menu bar, and then click on "Pivot table."A new sheet will be created with a pivot table builder on the right side of the screen.
  4. In the "Rows" section of the pivot table builder, click on "Add" and select the row header you want to use for your crosstab (for example, the categories you want to compare).
  5. In the "Columns" section of the pivot table builder, click on "Add" and select the column header you want to use for your crosstab (for example, the time periods you want to analyze).
  6. In the "Values" section of the pivot table builder, click on "Add" and select the data you want to display in your crosstab (for example, the number of units sold).
  7. Adjust any other settings in the pivot table builder, such as the aggregation type (sum, average, count, etc.) or sorting options, as needed.
  8. Your crosstab is now complete! You can further customize the appearance of the table by using the formatting options in Google Sheets.

Example

Let's say you have sales data for different products across various regions, and you want to create a crosstab to analyze the total sales for each product in each region.

  1. Your data might look something like this:
    Region | Product | Sales
    -------------------------
    North  | A       | 100
    North  | B       | 150
    South  | A       | 200
    South  | B       | 250
    East   | A       | 300
    East   | B       | 350
    West   | A       | 400
    West   | B       | 450
  2. Click on a cell within your data range, then go to "Data" > "Pivot table." A new sheet with the pivot table builder will appear.
  3. In the "Rows" section, click "Add" and select "Region."
  4. In the "Columns" section, click "Add" and select "Product."
  5. In the "Values" section, click "Add" and select "Sales." Make sure the aggregation type is set to "SUM" (which should be the default).
  6. Your crosstab will now display the total sales for each product in each region, like this:
           |  A  |  B  | Grand Total
    --------------------------------
    North  | 100 | 150 | 250
    South  | 200 | 250 | 450
    East   | 300 | 350 | 650
    West   | 400 | 450 | 850
  7. You can adjust the formatting, apply filters, or sort the data as needed to further analyze your crosstab.
Did you find this useful?