To design a pivot table in Google Sheets, you insert it from the menu (Insert > Pivot table), then drag fields into the Rows, Columns, Values, and Filter areas of the editor panel. The design is controlled by how you arrange fields, choose aggregation functions, sort, and format the output.
What a Pivot Table Does in Google Sheets
A pivot table is a data summarization tool that groups, counts, totals, or averages rows of raw data. Instead of writing formulas like =SUMIF() or =COUNTIF() for each category, you drag a field into a section and Google Sheets builds the summary instantly. For example, with a sales log containing columns Date, Region, Product, and Units Sold, you can create a pivot table that shows total units per region, or per product per month, without altering the original data.
The pivot table editor appears on the right side of the screen. It has four main areas:
- Rows – fields that become row labels (e.g., Region).
- Columns – fields that become column headers (e.g., Product).
- Values – fields that are aggregated (e.g., SUM of Units).
- Filter – fields that restrict the entire table (e.g., only show data from 2024).
How to Create a Pivot Table Step by Step
- Select any cell inside your data range, or select the entire range including headers.
- Click Insert > Pivot table.
- In the dialog, choose whether to use the selected range or a specific range you type. You can also place the pivot table in a new sheet or an existing cell.
- Click Create. The pivot table editor opens on the right.
- Add fields: click the “Add” button next to Rows, Columns, Values, or Filter and choose a column name from your data.
- Adjust the aggregation: in the Values section, click the field name (e.g., “Units”) and choose SUM, COUNT, AVERAGE, MIN, MAX, or other functions.
For example, if your data has columns A (Region), B (Product), C (Units), and D (Date), putting Region in Rows and Units in Values with SUM gives a table like:
- North – 1,250
- South – 980
- East – 1,100
Choosing the Right Layout: Rows vs. Columns
The most important design decision is which fields go into Rows versus Columns. Use Rows for the primary grouping you want to read down the left side. Use Columns for a secondary grouping you want to read across the top. For a compact table, keep the number of columns low—too many column fields create a wide, hard‑to‑scan table.
Consider a dataset with Year, Quarter, and Sales. If you put Year in Rows and Quarter in Columns, you get a matrix with 4 columns (Q1–Q4) and one row per year. If you put Quarter in Rows and Year in Columns, you get a taller table. Choose based on how you want to compare: comparing quarters side‑by‑side favors columns; comparing years downward favors rows.
You can also drag fields between sections after the pivot is created. The editor updates instantly, so you can experiment without rebuilding.
Sorting and Filtering in the Pivot Table
By default, Google Sheets sorts row labels alphabetically and columns alphabetically. To change the sort order, click the field name in the Rows or Columns section, then choose “Sort by” and pick a rule. You can sort by the row label (A→Z or Z→A) or by a value in the table, such as sorting regions by total sales descending.
To filter, use the Filter area or the small filter icon on the pivot table itself. The Filter area lets you restrict the underlying data, for example only showing rows where Product = “Widget”. You can also use the “Show” dropdown in the Rows or Columns field to select specific items to display or hide.
For numeric filters, click the field name in the Rows section, then “Filter by condition” and choose options like “Greater than” or “Between”. This is useful for excluding small categories that clutter the table.
Formatting and Design Tips
A pivot table is not just about data; it also needs to be readable. Here are common design adjustments:
- Number formatting: Select the value cells, then go to Format > Number and choose currency, percent, or thousands separator. This does not affect the underlying data.
- Bold totals: By default, Grand Total rows are bold. You can change the style by selecting the cells and applying bold or background color.
- Repeat row labels: In the Rows section, click the field name and check “Repeat row labels” to fill in every row instead of showing blanks for repeated values.
- Show totals: You can turn off row or column totals by clicking the field name and unchecking “Show totals”.
- Conditional formatting: You can apply conditional formatting to the pivot table range, but be careful—if the pivot changes size, the formatting may not extend automatically. Use a large range or apply after finalizing.
Common Problems and How to Fix Them
Several issues come up frequently when designing pivot tables in Google Sheets:
- “Can’t create pivot table” error: This usually means the data range is not rectangular or has merged cells. Remove merged cells and ensure every column has a header.
- Values show as “Count” instead of “Sum”: If your numeric column contains text or blank cells, Google Sheets may default to COUNT. Check the column for non‑numeric entries and clean them, or manually change the aggregation to SUM.
- Blank rows or “(blank)” labels: This appears when there are empty cells in the field you dragged. Fill in the blanks or filter them out using the Filter area.
- Pivot table not updating: Pivot tables do not auto‑refresh when you change the source data. Click the refresh icon in the pivot table editor or go to Data > Refresh pivot table.
- Date grouping not working: To group dates by month or year, you need to add a date field to Rows or Columns, then right‑click a date in the pivot and choose “Create pivot date group”. This only works if the column is formatted as a date.
Comparing Pivot Tables in Google Sheets vs. Excel
Google Sheets pivot tables are similar to Excel’s but have some differences. In Excel, you create a pivot table via Insert > PivotTable and use the PivotTable Fields pane. Google Sheets uses a simpler drag‑and‑drop editor. One major difference: Excel allows calculated fields and items directly in the pivot table, while Google Sheets does not. To add a calculated field in Sheets, you must add a helper column to your source data with a formula, then include that column in the pivot.
Another difference is the “Show values as” feature. Excel has many options like % of column total, running total, etc. Google Sheets has a limited set: you can change the aggregation function, but not easily compute percentages within the pivot. You can work around this by adding a calculated field in the source data (e.g., percentage of total) or by using the =GETPIVOTDATA() function in a separate cell.
Frequently Asked Questions
How do I change the aggregation from SUM to COUNT?
Click the field name in the Values section of the pivot table editor. A dropdown menu appears; select “COUNT” (or any other function). You can also click the small arrow next to the value in the pivot table itself and choose “Summarize by”.
Why does my pivot table show “(blank)” in rows?
This happens when the source data has empty cells in the field you placed in Rows. Either fill those cells with a value like “Unknown”, or add a filter to exclude blanks: click the field name in Rows, then “Filter by condition” > “Not empty”.
Can I add a calculated field like in Excel?
No, Google Sheets does not have a direct calculated field feature. Instead, add a new column to your source data with a formula (e.g., =C2*D2 for revenue), then refresh the pivot table and drag that new column into Values.
How do I group dates by month in a pivot table?
Make sure the date column is formatted as a date. Then, in the pivot table, right‑click any date value and choose “Create pivot date group” > “Month”. This adds a new field to the Rows or Columns section that groups by month.
Why is my pivot table not sorting numbers correctly?
If the source column contains numbers stored as text, sorting will be alphabetical (1, 10, 2). Convert the text to numbers: select the column, go to Data > Split text to columns (if needed), or use a formula like =VALUE(A2) in a helper column. Then refresh the pivot.
Can I share a pivot table with someone who doesn’t have Google account?
Yes, you can share the Google Sheets file with “Anyone with the link” as Viewer. They can see and interact with the pivot table, but not edit the source data unless you give Editor access.
Related
- Data Entry and Data Management: Clear Answers
- Google Sheets Percentage of Total: Easy Formula
- Random Number Generator Between Two Numbers
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Dashboard: Build a Useful Interactive ReportYes—you can build an interactive dashboard in Microsoft Excel by organizing data in a table, summarizing it with…
- Excel Waterfall Chart: How to Set the Last Bar as a TotalTo make the last bar in an Excel waterfall chart show the final total, right-click that bar and…
- Create an Organizational Chart in Google SheetsTo create an organizational chart in Google Sheets, put each person or position in the first column and…
- Pivot Table Reorder Columns: How to Move FieldsTo reorder columns in a pivot table, simply click and drag the column header (the field button) left…
- Free Comparison Chart Template for Excel: How to Build OneYes. You can make a free comparison chart template in Microsoft Excel by listing the options in rows,…
- How to Make a Proper Histogram in Excel: Step by StepTo make a proper histogram in Excel, put one set of numeric measurements in a column, select the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.