Key points
- Start from one list with a single header row, no blank rows or columns, and one data type per column. Microsoft recommends turning it into an Excel table first.
- Drag fields into four areas: Rows, Columns, Values and Filters. Account in Rows, month in Columns and amount in Values gives an expense report by month.
- Numbers in Values are summed by default; a column Excel reads as text is counted instead. A count where you expected a total usually means amounts stored as text.
- A PivotTable does not update itself. Refresh it after the source changes, and check its grand total against the ledger before you send it.
A PivotTable lets you take a list of sales or expense lines and, in a few minutes, total it by customer, account, branch or month without writing a formula. Once the data is clean, building one takes a few minutes; most of the 20 minutes goes on preparing the list and checking that the result agrees with the ledger. This guide walks through both, with an expense report as the worked example.
What is a PivotTable, and when does an accountant need one?
A PivotTable is an Excel summary built from a list. You choose which field goes down the side, which goes across the top and which gets added up, and Excel produces the totals. An accountant uses one whenever a manager asks a question the accounting system’s standard reports do not answer directly: sales by customer by month, expenses by branch, or which ten suppliers took most of the payments.
It works on an exported copy, so nothing you do in it touches the accounting system. It is also a snapshot: when the list underneath changes, the PivotTable keeps the old figures until you refresh it.
How should the data be prepared?
Microsoft sets three conditions: the data sits in columns with a single header row, it has no blank rows or columns, and each column holds one type of data. Ideally it is an Excel table. Exports from accounting systems often break these rules with report titles, subtotal lines and blank separators, so clean those out first.
- Delete report headers, page titles and subtotal rows. A subtotal inside the data is counted twice.
- Give every column a short, unique header, such as Date, Account, Branch and Amount. These headers become the field names you drag around.
- Keep debit and credit amounts as numbers. If an amount column is stored as text, the PivotTable will count it instead of adding it.
- Keep real dates in the date column, not text such as “Oct-26”, so that Excel can group them by month.
- Convert the range to a table with Insert, Table. Typing in the row below a table extends it, so new lines are picked up when you refresh.
How do you build an expense report by account and month?
Select a cell in the table, choose Insert, PivotTable, and put it on a new sheet. The field list opens with four areas: Rows, Columns, Values and Filters. Drag Account to Rows, Date to Columns and Amount to Values. Excel totals each account for each month and adds grand totals for both.
Recent versions of Excel group dates automatically when you add a date field, so you may see months and quarters appear on their own. If they do not, or you want a different period, right-click a date in the PivotTable, choose Group and pick the period. If automatic grouping gets in your way, it can be switched off under File, Options, Data.
Why does the PivotTable show a count instead of a total?
Because Excel read the amount column as text. Numbers placed in Values are summed by default, and text is counted. Changing the calculation to Sum in Value Field Settings will not help while the amounts are text, so convert them to numbers in the source, refresh, and check again.
Value Field Settings is also where you choose other calculations, such as Average, Max, Min or Count Numbers. Open it from the arrow next to the field name in the Values area.
How do you show shares and month-on-month changes?
Use Show Values As. Right-click a number in the PivotTable, choose Show Values As, and pick a calculation. The same totals then appear as a percentage, a difference or a running total, with no formulas added. Drag Amount into Values a second time if you want the amount and the percentage side by side.
| Question | Rows | Columns | Values, shown as |
|---|---|---|---|
| What did each account cost each month? | Account | Date grouped by month | Sum of Amount |
| Which customers make up most of sales? | Customer | None | % of Grand Total, sorted largest first |
| How did each expense move against last month? | Account | Month | % Difference From, previous month |
| How are sales building up over the year? | Month | None | Running Total in, month |
| How many invoices did each branch issue? | Branch | None | Count of Invoice number |
How do you let a manager filter the report?
Add a slicer or a timeline. A slicer is a set of buttons that filters the PivotTable, for example one button per branch: click inside the PivotTable and choose Insert, Slicer. A timeline filters by date at four levels, years, quarters, months or days, and is inserted from the PivotTable Analyze tab (Analyze in some versions) with Insert Timeline. One slicer can drive several PivotTables, provided they share the same data source, through Report Connections.
Why might the PivotTable not agree with the ledger?
There are four usual reasons: it has not been refreshed since the data changed, the source range stops short of new rows, a subtotal line in the export is counted twice, or some amounts are text and drop out of the sum. Refresh by right-clicking the PivotTable and choosing Refresh, or use Refresh All on the PivotTable Analyze tab when a file has several.
Before sending any PivotTable, compare its grand total with the same accounts and period in the trial balance. If they differ, the report is wrong, and the four reasons above are where to look.
Common questions
- I added rows and refreshed, but they do not appear. Why?
- The PivotTable is probably built on a fixed range that ends above the new rows. Build it on an Excel table instead: typing in the row below a table extends the table, and the PivotTable follows it on refresh.
- What are Recommended PivotTables?
- A feature where Excel suggests layouts based on your data. Microsoft says it is available only to Microsoft 365 subscribers. It is a useful starting point, but you still need to check which fields it chose.
- Can I build a PivotTable from a trial balance?
- Yes, if each row is one account with its balance and you add a column for the account group, such as Revenue or Admin expenses. The PivotTable then totals by group, which is a quick first draft of an income statement.
- Are the menu names the same in Arabic Excel?
- No. Microsoft’s Arabic help shows translated labels, such as إدراج for Insert, إعدادات حقل القيمة for Value Field Settings and إظهار القيم كـ for Show Values As. The steps in this guide are the same under those names.
Sources
The pages the figures and rules in this article were checked against, read in November 2026.
- support.microsoft.com/en-us/office/create-a-pivottable-to-analyze-w...
- support.microsoft.com/ar-sa/office/create-a-pivottable-to-analyze-w...
- support.microsoft.com/en-us/office/change-the-summary-function-or-c...
- support.microsoft.com/en-us/office/show-different-calculations-in-p...
- support.microsoft.com/en-us/office/group-or-ungroup-data-in-a-pivot...
- support.microsoft.com/en-us/excel/data-import-and-analysis-options-...
- support.microsoft.com/en-us/office/use-slicers-to-filter-data-249f9...
- support.microsoft.com/en-us/office/create-a-pivottable-timeline-to-...
- support.microsoft.com/en-us/excel/resize-a-table-by-adding-or-remov...
- support.microsoft.com/en-us/office/create-and-format-tables-e81aa34...
