Last Updated: 13/07/2026
If you’re working with rows of raw sales, customer, or transaction data and feel like you’re drowning in numbers, a pivot table is the tool that turns that mess into clear, actionable insight – in just a few clicks. In this tutorial, we’ll walk through exactly how to build pivot tables in LibreOffice Calc, using a simple weekly sales dataset as our example. The same logic applies almost identically in OpenOffice Calc and Microsoft Excel.
What You'll Need
To follow along, you just need a spreadsheet with consistent columns and rows of data. In this example, the dataset includes:
- Date – the day the transaction occurred
- Seller ID – the sales agent who made the sale
- Customer ID – a unique identifier for each customer
- Transaction ID – a unique ID for each individual sale
- Product ID – the product that was sold
- Product Price – the value of that product
This sample data covers one week (the 1st through the 7th) of sales activity across multiple sellers, customers, and products.
Step 1: Prepare and Label Your Spreadsheet
Before creating any pivot tables, it helps to:
- Open a blank spreadsheet in LibreOffice Calc and paste in your raw data.
- Rename the default “Sheet1” tab to something meaningful, like “Weekly Sales” – this keeps your workbook organised as you add more pivot tables later.
Step 2: Create Your First Pivot Table (Daily Sales Totals)
- Click the small blank box at the top-left corner of the spreadsheet (between the row and column headers) to select all your data at once.
- Go to Data > Pivot Table > Create.
- Confirm the selection range and click OK.
- In the Pivot Table Layout window, delete the default “Data” field.
- Drag Date into the Row Fields area.
- Drag Product Price into the Data Fields area, making sure it’s set to Sum (double-click it to change the function if needed).
- Click OK, then OK again.
Step 3: Create a Pivot Table by Seller
Repeat the same process, but this time:
- Select the full “Weekly Sales” dataset again.
- Go to Data > Pivot Table > Create.
- Drag Seller ID into Row Fields and Product Price into Data Fields (as Sum).
- Click OK.
The result shows total sales per seller for the entire week, along with the grand total. Label this sheet “Sellers’ Total Sales.”
Step 4: Build a Detailed, Multi-Level Pivot Table
For a much richer breakdown, create another pivot table and this time drag in all of the following into the Row Fields:
- Date
- Seller ID
- Customer ID
- Transaction ID
- Product ID
- Product Price (as Sum, in Data Fields)
This produces a detailed hierarchy showing, for each day, which seller sold to which customer, under which transaction ID, which products were involved, and the value of each sale.
The real power move: filtering
Once this detailed pivot table is built, you can click the drop-down filter on any field – like Seller ID – and select just one value (e.g., Seller ID #1). The table instantly recalculates to show only that seller’s transactions, days worked, and total sales – matching the totals from your simpler “Sellers’ Total Sales” table.
You can do the same for:
- Customer ID – see exactly what a specific customer purchased, on which days, and from which sellers.
- Product ID – see how many times a specific product sold, on which days, and to whom.
This lets you slice the exact same dataset from countless angles without rebuilding anything manually.
Step 5: Create a Pivot Table by Product
One more useful view: drag Product ID into Row Fields and Product Price into Data Fields (Sum). This shows you total sales per product, making it easy to spot your best- and worst-performing items at a glance.
Step 6: Visualise Your Data with Charts
Pivot tables aren’t just for numbers – you can turn any of them into a chart instantly:
- Select your pivot table data.
- Go to Insert > Chart.
- Choose a chart type – column charts work well for comparing sellers or daily totals, while pie charts are great for showing proportional breakdowns (e.g., which seller contributed the biggest “slice” of total sales).
Why Pivot Tables Matter
Without a pivot table, extracting this same level of insight from raw data would mean manually filtering and calculating totals row by row – a slow, error-prone process. With a pivot table, you get:
- Instant totals by day, seller, customer, or product
- One-click filtering to drill into specific segments
- Visual charts built directly from summarised data
- A reusable structure you can apply to any consistent dataset – sales, expenses, personal budgets, mortgage payments, you name it
Final Thoughts
Pivot tables are one of the most powerful – and underused – features in LibreOffice Calc. Once you understand the basic drag-and-drop workflow (Row Fields, Data Fields, and filters), you can turn any spreadsheet of raw data into a clear analytical summary in seconds. Start with a simple one-column breakdown, then work your way up to the more advanced multi-field pivot table for deeper insights.
