Skip to content

Pivot tables

A pivot table sums up a long list in a short report: sales by party, by item, by area or by month, without writing a formula. You choose which columns go down the side, which go across the top, and which numbers are added up. Change your mind and the report is redone at once.

Make one with Insert ▸ Tables ▸ Pivot Table. While the active cell is in the report, the Pivot Table Analyze tab and the Pivot Table Fields pane are open.

A distributor's sales list summed up in a pivot table on a new sheet: Date in Rows, grouped into FY 2025-26 (Feb, Mar) and FY 2026-27 (Apr, May, Jun); Item in Columns (Sugar 50 kg, Tea 1 kg, Toor Dal 30 kg); Sum of Amount in Values, with a grand total of ₹ 1,18,440.00. The Pivot Table Fields pane is on the right, and the Pivot Table Analyze tab is open.

The data for a pivot table

The data must be a list with a heading in every column and one row for each record. The examples in this chapter use a distributor's sales from Pune, with one row per bill:

Date Shop Area Item Qty Amount
14/02/2026 Shree Kirana Kothrud Tea 1 kg 18 ₹ 8,640
21/02/2026 Om Stores Hadapsar Sugar 50 kg 4 ₹ 8,400
07/03/2026 Laxmi Traders Baner Toor Dal 30 kg 2 ₹ 6,600
…
20/06/2026 Om Stores Hadapsar Toor Dal 30 kg 4 ₹ 13,200

There are 14 bills from February to June 2026, for ₹ 1,18,440 in all.

  • Don't leave a column without a heading. Ganit won't make the pivot table, and says the field name is not valid.
  • Keep totals out of the list. A total row would be counted as another record.
  • Format the Amount column the way you want the report to show it, for example with Home ▸ Number ▸ ₹. The report uses the same format.

Making a pivot table

  1. Click any cell in the list.
  2. Go to Insert ▸ Tables ▸ Pivot Table. If the list is a table, Table Design ▸ Tools ▸ Pivot Table does the same.
  3. In Create Pivot Table, check Table/Range. Ganit fills in the list around the active cell, such as Sheet1!A1:F15.
  4. Choose where the report goes:
    • New Worksheet: a new sheet, in front of the data's sheet. The report starts at A3.
    • Existing Worksheet: type the top-left cell in Location, such as H3. Ganit suggests the second column to the right of the list.
  5. Click OK.

The new pivot table is empty, and the Pivot Table Fields pane opens on the right. Next, choose the fields.

Note

If the list is a table with its Total Row on, take the Total Row out of Table/Range, or it is counted as a record.

Choosing the fields

The Pivot Table Fields pane lists each column of the data as a field. Under it are four areas:

Area What it does
Rows One row of the report for each value, such as each shop
Columns One column of the report for each value, such as each item
Values The numbers that are summed up, such as Amount
Filters A field to filter the whole report by, shown above it

To add a field, tick it in the list. A field of numbers goes to Values. Any other field, dates too, goes to Rows. Untick a field to take it out of the report.

To put a field in another area, drag it from the list or from one area to another. Drag a field back to the list to remove it. Search at the top narrows the list when the data has many columns.

For sales by shop, tick Shop and Amount:

Row Labels Sum of Amount
Laxmi Traders ₹ 30,000
Om Stores ₹ 45,300
Shree Kirana ₹ 43,140
Grand Total ₹ 1,18,440

The field menu

Click a field in one of the areas to open its menu:

Command What it does
Move Up, Move Down Changes the order of the fields in the area
Move to Report Filter, Move to Row Labels, Move to Column Labels, Move to Values Moves the field to that area
Sort A to Z, Sort Z to A, More Sort Options… Sorts a Rows or Columns field (see Sorting the report)
Group…, Ungroup For a field of dates in Rows or Columns (see Grouping dates)
Remove Field Takes the field out of the report
Value Field Settings… For a field in Values: Sum, Count, Average and so on
Filter… For a field in Filters: which values to keep

Two fields in Rows

Put two fields in Rows to nest one inside the other. With Area then Shop in Rows, each area shows its total, with its shops under it.

Rows and columns together

Put Shop in Rows and Item in Columns for a grid of each shop's sales of each item:

Sum of Amount Column Labels
Row Labels Sugar 50 kg Tea 1 kg Toor Dal 30 kg Grand Total
Laxmi Traders ₹ 6,300 ₹ 7,200 ₹ 16,500 ₹ 30,000
Om Stores ₹ 27,300 ₹ 4,800 ₹ 13,200 ₹ 45,300
Shree Kirana ₹ 6,300 ₹ 30,240 ₹ 6,600 ₹ 43,140
Grand Total ₹ 39,900 ₹ 42,240 ₹ 36,300 ₹ 1,18,440

Summarising values: sum, count, average

A field of numbers in Values is summed. A field of text put in Values is counted. To change it:

  1. Click the field in Values, such as Sum of Amount, and choose Value Field Settings….
  2. Under Summarize value field by, click one: Sum, Count, Average, Max, Min, Product or Count Numbers.
  3. Click OK.
Choice What it shows
Sum The total
Count How many records, such as the number of bills
Average The average, such as the average bill
Max, Min The largest or smallest value
Product All the values multiplied together
Count Numbers How many records have a number in this field

The heading changes to match, such as Average of Qty.

You can put the same field in Values more than once. Drag Amount to Values again and set the second one to Count to see each item's sales and its number of bills side by side:

Row Labels Sum of Amount Count of Amount
Sugar 50 kg ₹ 39,900 5
Tea 1 kg ₹ 42,240 5
Toor Dal 30 kg ₹ 36,300 4
Grand Total ₹ 1,18,440 14

Note

Ganit's pivot tables have no Show Values As setting (percent of total, running total and so on). For each shop's share of sales, put a formula beside the report, such as =B4/$B$7, and format it with Home ▸ Number ▸ %.

Grouping dates by month, quarter or financial year

When you put a field of dates in Rows or Columns, Ganit groups it:

  • Dates within one calendar year are grouped by month.
  • Dates over more than one year are grouped by years, quarters and months.

To group another way:

  1. Click a cell in the report.
  2. Go to Pivot Table Analyze ▸ Group ▸ Group Field. If more than one date field is in the report, pick the field. You can also click the date field in Rows and choose Group….
  3. In Grouping, click each way to group by. Click again to unpick one.

    Choice Example labels
    Days 14-Feb
    Months Feb, Mar, Apr
    Quarters Qtr1, Qtr2
    Years 2026
    FY Quarters (April to March) Q4 (Jan–Mar), Q1 (Apr–Jun)
    Financial Years (April to March) FY 2025-26, FY 2026-27
  4. Click OK.

With Financial Years and Months picked, the sales come out under each financial year, with the months in April to March order:

Row Labels Sum of Amount
FY 2025-26 ₹ 29,940
Feb ₹ 17,040
Mar ₹ 12,900
FY 2026-27 ₹ 88,500
Apr ₹ 25,200
May ₹ 31,800
Jun ₹ 31,500
Grand Total ₹ 1,18,440

With FY Quarters in place of Months, FY 2025-26 shows Q4 (Jan–Mar) and FY 2026-27 shows Q1 (Apr–Jun).

To show each date on its own again, click Pivot Table Analyze ▸ Group ▸ Ungroup.

A field counts as dates when its cells hold dates with a date format, such as 14/02/2026. Dates typed as text can't be grouped.

Filtering the report

A report filter

Put a field in Filters to filter the whole report by it. The field and its choice show above the report, for example Item and (All).

  1. Click the field in Filters and choose Filter….
  2. Untick the values to leave out. (All) ticks or unticks them all.
  3. Click OK.

With only Tea 1 kg ticked, the sales by shop become:

Item Tea 1 kg
Row Labels Sum of Amount
Laxmi Traders ₹ 7,200
Om Stores ₹ 4,800
Shree Kirana ₹ 30,240
Grand Total ₹ 42,240

When more than one value is ticked, the report shows (Multiple Items). At least one value must stay ticked.

Sorting the report

Items in Rows and Columns are in A to Z order. To change it, click a cell of the report:

  • On a label, such as a shop's name: Data ▸ Sort A to Z or Sort Z to A, or the same on the right-click menu. This sorts that field's items by name.
  • On a number, such as a shop's total: right-click and choose Sort Largest to Smallest or Sort Smallest to Largest. Data ▸ Sort A to Z and Sort Z to A do the same here. This sorts the items by their totals.

For more choices, choose More Sort Options… on the right-click menu, or Data ▸ Sort…. The Sort dialog for the field has Ascending (A to Z) by and Descending (Z to A) by, each with the field's own name or one of the value fields. Items with the same total stay in A to Z order.

Sorting items by Sum of Amount, largest first:

Row Labels Sum of Amount
Tea 1 kg ₹ 42,240
Sugar 50 kg ₹ 39,900
Toor Dal 30 kg ₹ 36,300
Grand Total ₹ 1,18,440

The sort stays when the report is refreshed.

Refreshing after the data changes

The report holds values, not formulas. When you change the data, the report stays as it was until you refresh it.

  • Pivot Table Analyze ▸ Data ▸ Refresh redoes this pivot table.
  • Refresh All redoes every pivot table in the workbook. It is on the Pivot Table Analyze tab and on Data ▸ Get Data.

Note

The shortcuts Alt+F5 (Refresh) and Ctrl+Alt+F5 (Refresh All) open the Go To dialog instead. Use the ribbon buttons.

Adding rows to the data

Rows you insert inside the data's range are included when you refresh. Rows typed under the last row are not. For those:

  1. Click Pivot Table Analyze ▸ Data ▸ Change Data Source.
  2. In Table/Range, type the new range, such as Sheet1!A1:F200.
  3. Click OK.

The fields stay where they were, matched by the position of their columns.

If the report grows over cells that already hold something, Ganit asks "There's already data in the cells the pivot table needs. Do you want to replace it?" Click OK to write over them, or Cancel and move those cells first.

Changing the layout

The Layout group on the Pivot Table Analyze tab:

Button Choices
Report Layout Show in Compact Form: all Rows fields in one column, each level indented, group totals on the group's own row. This is how a new pivot table starts. Show in Tabular Form: each Rows field in its own column, with a total row under each group.
Grand Totals Off for Rows and Columns, On for Rows and Columns, On for Rows Only (a Grand Total column at the right), On for Columns Only (a Grand Total row at the bottom)
Subtotals Do Not Show Subtotals, Show All Subtotals

In Tabular Form, Area and Shop in Rows look like this:

Area Shop Sum of Amount
Baner Laxmi Traders ₹ 30,000
Baner Total ₹ 30,000
Hadapsar Om Stores ₹ 45,300
Hadapsar Total ₹ 45,300
Kothrud Shree Kirana ₹ 43,140
Kothrud Total ₹ 43,140
Grand Total ₹ 1,18,440

Ganit widens the report's columns to fit their labels and numbers each time it redoes the report. The report has one fixed look, with the headings and totals in bold. There are no pivot table styles to choose from.

The Pivot Table Analyze tab

Group Buttons
Data Refresh, Refresh All, Change Data Source
Group Group Field, Ungroup (for date fields)
Layout Report Layout, Grand Totals, Subtotals
Show Field List: shows or hides the Pivot Table Fields pane
Actions Clear All: takes every field out of the report. Delete Pivot Table: removes the report and its cells.

The pane's ✕ closes it too. Click Field List to open it again.

Things to know

  • You can't type over the report's cells. Ganit says "Cannot change this part of a pivot table report." Change the data and refresh, or move the fields in the pane.
  • Each step that changes the report is one step of undo (Ctrl+Z).
  • To chart the report, select its cells and use Insert ▸ Charts. See Charts and sparklines. The chart doesn't follow the report when its size changes.
  • Pivot tables are saved in the .xlsx file and open as pivot tables in other spreadsheet apps.
  • For a total by financial year with formulas instead, see FY and SUMIF in Indian formats, words and languages.