Sub topic 2
Choosing Row and Column Fields in an Excel PivotTable
Assume you can navigate Excel, work with ranges, enter data, and use simple formulas such as SUM. A PivotTable summarizes source records by placing fields into areas that answer a specific question.
Choosing row and column fields
Use Rows for the categories you want to list vertically. Use Columns for categories you want to compare horizontally. For example:
| PivotTable area | Field | Result |
|---|---|---|
| Rows | Region | One row for each region |
| Columns | Product | One column for each product |
| Values | Sales | A sales total in each cell |
Drag Region to Rows and Product to Columns. The resulting grid shows sales for every region–product combination.
Adding value fields
Drag a numeric field, such as Sales or Units, into Values. Excel usually chooses Sum for numeric data. You can add the same field more than once, then configure each copy differently, such as a total and a percentage.
A field in Values is calculated for each intersection of the row and column fields. A blank-looking intersection may mean that no source records match that combination.
Choosing a summary function
Open the value field menu and choose Value Field Settings. Select a function that matches the question:
| Function | Use it to |
|---|---|
| Sum | Total a measure such as Sales |
| Count | Count records or nonblank entries |
| Average | Find the mean value |
| Max or Min | Find an extreme value |
If numbers are stored as text, Excel may default to Count instead of Sum. Correct the source data before changing the PivotTable.
Sorting and filtering results
Use the row or column label menu to sort alphabetically, by a value, or largest to smallest. Filters remove categories from the display without deleting source records. A filter on Region can show only East, while the source still contains every region.
Grouping dates and numeric ranges
Right-click a date in the PivotTable and choose Group. Select units such as months, quarters, or years. For numeric fields, group values into intervals, such as 0–99, 100–199, and 200–299. Grouping requires consistent data types; blank or invalid dates can prevent it.
Exercise
Which layout compares total Units by Region and Product?
Show answer
Put Region in Rows, Product in Columns, and Units in Values with Sum selected.