A pivot table sample is a small, ready-to-use dataset paired with an example pivot table that shows how to summarize, group, and analyze that data in Excel. Below is a concrete sample you can copy, followed by step-by-step instructions to build the pivot table yourself, plus common problems and answers to frequent questions.
What a Pivot Table Actually Does
A pivot table takes a flat list of rows (like a sales log) and rearranges it into a summary. Instead of writing formulas like SUMIFS for every category, you drag fields into four areas: Rows, Columns, Values, and Filters. The engine then counts, sums, averages, or finds min/max values for each combination. For example, with 500 rows of sales data, a pivot table can show total sales per product per month in under a minute—no formulas required.
A Real Pivot Table Sample Dataset
Copy the table below into cells A1:D13 of a new Excel worksheet. This is a realistic mini sales log for a small online store.
- Row 1: Date | Product | Region | Sales
- Row 2: 2024-01-05 | Widget | North | 120
- Row 3: 2024-01-12 | Gadget | South | 85
- Row 4: 2024-01-19 | Widget | East | 150
- Row 5: 2024-02-02 | Gadget | North | 95
- Row 6: 2024-02-09 | Widget | South | 130
- Row 7: 2024-02-16 | Gadget | East | 110
- Row 8: 2024-03-01 | Widget | North | 160
- Row 9: 2024-03-08 | Gadget | South | 75
- Row 10: 2024-03-15 | Widget | East | 140
- Row 11: 2024-03-22 | Gadget | North | 105
- Row 12: 2024-03-29 | Widget | South | 170
This dataset has 12 rows, but the same steps work for thousands of rows. If you have a real dataset, replace these values with your own.
How to Build the Pivot Table Step by Step (Excel for Microsoft 365)
Follow these steps on Windows. On Mac, the ribbon paths are the same names, but the keyboard shortcut for creating a pivot table is Cmd+Option+P instead of Alt+N+V.
- Click any cell inside the data range (e.g., A2).
- Go to Insert > PivotTable (or press Alt+N+V on Windows).
- In the dialog, confirm the range is
A1:D13and choose “New Worksheet”. Click OK. - In the PivotTable Fields pane on the right, drag Product to the Rows area.
- Drag Region to the Columns area.
- Drag Sales to the Values area. It defaults to Sum of Sales.
- Drag Date to the Filters area (optional, to filter by month later).
The result shows each product as a row, each region as a column, and the total sales in each cell. The Grand Total row and column appear automatically. For this sample, the Widget total is 870 and Gadget total is 470, with overall total 1340.
How to Choose Which Fields Go Where
The placement of fields determines what the pivot table shows. Use these guidelines:
- Rows: Put the category you want to compare vertically (e.g., product, department, customer).
- Columns: Put a second category you want to compare side-by-side (e.g., region, quarter, salesperson).
- Values: Put the numeric field you want to summarize (e.g., sales, quantity, profit).
- Filters: Put a field you want to slice the whole table by (e.g., date range, active status).
If you want a simple one-dimensional summary, just use Rows and Values. For example, drag only Product to Rows and Sales to Values to get total sales per product.
Common Problems and Fixes When Using a Sample
People often hit these issues even with a small sample:
- Blank cells in the source: If a cell in the Sales column is empty, the pivot table treats it as zero for sums but as a separate category for counts. Fill blanks with 0 or use
=IF(A2="",0,A2)in a helper column. - Text numbers: If your Sales column contains numbers stored as text (green triangle in the corner), the pivot table won’t sum them. Select the column, go to Data > Text to Columns, and finish to convert to real numbers.
- “The PivotTable field name is not valid” error: This happens when your source data has a blank column header. Make sure every column in row 1 has a non-empty, unique name.
- Dates not grouping by month: Right-click a date in the pivot table, choose Group, then select Months and Years. If your dates are text, convert them to real dates first.
- New rows added after creating the pivot: The pivot won’t include them unless you expand the source range. Convert your data to a Table (Ctrl+T) before creating the pivot, or update the range in PivotTable Analyze > Change Data Source.
Comparing Pivot Tables to SUMIFS Formulas
Both methods summarize data, but they differ in speed and flexibility. A pivot table is faster to build and lets you rearrange fields by dragging—no formula editing. SUMIFS formulas are better when you need a single result embedded in a larger report, or when you want the summary to update without a user refreshing. For example, to get Widget sales in the North region with SUMIFS, you would write:
=SUMIFS(D2:D13, B2:B13, "Widget", C2:C13, "North")
That returns 280 for the sample. But if you need all combinations of product and region, you would write six formulas. The pivot table gives you all six in one step. Also, pivot tables require a manual refresh (right-click > Refresh) when source data changes, while SUMIFS recalculates automatically.
Cost and Alternatives: Is There a Free Option?
Pivot tables are built into Microsoft Excel, which requires a Microsoft 365 subscription (about $6–$10 per month for personal use) or a one-time purchase of Excel 2021/2024. Free alternatives include Google Sheets (its pivot tables work similarly, accessed via Insert > Pivot table), LibreOffice Calc (Data > Pivot Table), and Apple Numbers (which has a simplified “Pivot” feature but fewer options). For large datasets, a database tool like SQL or Power BI can do the same grouping with more power, but pivot tables are the simplest for everyday analysis.
Frequently Asked Questions
How do I refresh a pivot table after changing the source data? Click anywhere in the pivot table, then go to PivotTable Analyze > Refresh (or press Alt+F5 on Windows). If you have multiple pivot tables, use Refresh All (Alt+A, then R). On Mac, use Data > Refresh All.
Can I create a pivot table from multiple sheets? Yes, but not directly with the standard pivot table wizard. Use Alt+D+P to open the old wizard, select “Multiple consolidation ranges”, and then add each range. Alternatively, combine sheets with Power Query (Data > Get Data > Combine Queries) and then pivot the combined table.
Why does my pivot table show “Count of Sales” instead of “Sum of Sales”? This happens when your Sales column contains any text or blank cells. Excel defaults to Count when the field isn’t purely numeric. Fix the source data by ensuring all values are numbers, then right-click the pivot value field and choose Value Field Settings > Sum.
How do I show percentages instead of totals in a pivot table? Right-click any value in the Values area, choose Show Values As, then select “% of Grand Total”, “% of Row Total”, or “% of Column Total”. For the sample, if you choose “% of Grand Total”, the Widget/North cell (120) would show 8.96%.
Can I filter a pivot table by a date range without using the Filters area? Yes. Drag the Date field to the Rows area, then right-click a date and choose Group to group by months or years. Then use the small filter arrow next to “Row Labels” to uncheck specific months. Alternatively, add a slicer (Insert > Slicer) and select the Date field.
Is there a way to copy just the pivot table values without the formatting? Select the pivot table, press Ctrl+C, then right-click a new cell and choose Paste Special > Values. This removes the pivot structure and leaves only the numbers. On Mac, use Cmd+C and then Edit > Paste Special > Values.
Related
- Google Sheets PERCENTILE IF: Formula & Examples
- Shortcut for Saving in Excel: Ctrl+S and More
- Data Entry: What It Is, How It Works, and How to Get Started
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Power Pivot Calculated Fields: Measures ExplainedIn Excel Power Pivot, what many people call a calculated field is usually a DAX measure: a formula…
- Pareto Chart in Excel: How to Create and Interpret ItTo make a Pareto chart in Microsoft Excel for Microsoft 365 on Windows, arrange categories and their counts…
- Excel Donut Chart Labels Outside: How to Set ThemYes. In Excel for Microsoft 365 on Windows, select the donut chart, then choose Chart Design > Add…
- Create a Pivot Table in Excel From Multiple Sheets?To create a PivotTable from multiple sheets in Excel for Microsoft 365 on Windows, combine the sheets’ data…
- Excel Trendline Slope Formula: Find and Interpret ItIf your x-values are in A2:A6 and your y-values are in B2:B6, calculate the linear trendline slope in…
- Gantt Chart Excel Template for Mac: A Practical Setup GuideYes—you can use a Gantt chart Excel template on a Mac, or build a simple one in Excel…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.