Sub topic 2
Grouping data with rows and columns
This chapter assumes you can select ranges, enter simple formulas, and read a table of records. You should also know what sum, count, and average mean. It covers the Rows, Columns, Values, and Filters fields in the pivot table editor, and how those settings control sorting, totals, and filtering.
Grouping data with rows and columns
A pivot table groups source records by the fields you place in Rows and Columns. Each unique value in a Rows field becomes one row of output. Each unique value in a Columns field becomes one column. Values fields then fill the grid with numbers.
To start, open Data > Pivot table, add Region to Rows, and add Product to Columns. Each cell now shows the result for one region and product pair.
Calculating values with Summarize by
Each Values field has a Summarize by setting. SUM adds the numbers. COUNTA counts non-empty cells. AVERAGE returns the mean, and MIN and MAX return the smallest and largest values.
Choose the function that matches the question. Summing a Revenue column gives total revenue. Averaging it gives the typical order size. Counting an Order ID column gives the number of orders.
Sorting results and controlling totals
Open the sort menu on a row or column label to sort alphabetically. To sort by a value, pick the Values field in the sort options and choose descending order. The largest region then appears first.
The Totals settings control whether the table shows row and column grand totals. Turn them off when you only need the detail rows.
Filtering what the pivot table includes
Use the Filters section to remove records before the summary is calculated. Add Year to Filters, then select only the years you want. The totals update to match the remaining records.
Exercise
Exercise
Your sales data has Region, Product, Year, and Revenue columns. You want total revenue by region for 2025 only, with the largest region first. Where does each field go?
Show answer
Put Region in Rows, and Revenue in Values with Summarize by set to SUM. Put Year in Filters and select only 2025. Sort the Region rows by the Revenue values in descending order.