Documents & spreadsheets guide

How to make a pivot table to summarise sales or stock data

By Taha Tahir Ali · Updated

Short answer

Put your data in one table with one header row and no blank rows, select it, insert a pivot table, then choose what goes in rows (for example customer), columns (for example month) and values (sum of amount). Raaj Office Sheets makes pivot tables with sum, count, average, minimum and maximum on a new sheet, in the browser, without uploading your data.

You have an export of every sale this year, thousands of rows, and you want answers: which customers buy most, which products sell in which month, who hasn't bought lately. A pivot table turns those rows into a summary in a few clicks, without formulas.

Step 1: Get the data in shape

A pivot table needs a clean table:

  • One header row with a short name for each column: Date, Customer, Product, Qty, Amount.
  • One row per record (one sale line per row).
  • No blank rows or subtotal rows in the middle.
  • Numbers as numbers and dates as dates (see how to open a CSV in Excel format for fixing imports).
Date Customer Product Qty Amount
03-04-2026 Sharma Traders Drill 13 mm 2 4,200
… … … … …

Step 2: Create the pivot table

In Raaj Office Sheets:

  1. Select the table including the header row.
  2. Insert a pivot table; it is created on a new sheet.
  3. Choose the rows: what you want a line per (for example Customer).
  4. Choose the columns (optional): what you want across the top (for example Month or Product).
  5. Choose the values and how to summarise them: sum of Amount, count of sales, average, minimum or maximum.

Questions a pivot table answers

Question Rows Columns Values
Who are my top customers? Customer (none) Sum of Amount
Which products sell in which month? Product Month Sum of Qty
How many orders does each salesperson take? Salesperson (none) Count of Invoice
What is the average order size by city? City (none) Average of Amount

Sort the result from largest to smallest to see the leaders immediately.

Add a chart

Select the pivot result and insert a chart: column or bar for comparisons, line for trends over months, pie only for a few shares of a whole. Charts can be saved as PNG for reports. When saved to XLSX, charts are stored as pictures rather than editable Excel charts.

Common mistakes

  • Merged cells or two-row headers in the source data.
  • Text amounts ("4,200 Cr") that can't be summed.
  • Forgetting to refresh after adding new rows: recreate or update the pivot table.

Frequently asked questions

Do I need Excel to make a pivot table?

No. Raaj Office Sheets, LibreOffice Calc and Google Sheets all make pivot tables.

Can I make a pivot table from a PDF report?

Convert it first: see how to convert a PDF table to Excel.

Is my sales data uploaded?

No. Raaj Office keeps files in your browser.

Raaj Software

May you never need us again.

We build solutions that make themselves indispensable, not problems that make us indispensable.

A philosophy of customer independence, not customer dependency.