Pivot Tables: Transforming Raw Data into Meaningful Insights
When dealing with extensive datasets, analyzing the information within a worksheet can be overwhelming. Pivot tables in Excel offer a powerful solution, enabling users to instantly calculate, summarize, and reorganize data for improved readability and analysis. They allow you to transform raw data into meaningful insights and reports in minutes, without requiring any prior knowledge of Excel’s built-in formulas.
Understanding Pivot Tables
A PivotTable is a dynamic tool that summarizes and reorganizes selected columns and rows of data (such as statistics, averages, sums, etc.) in a spreadsheet or database table to obtain a required report.
Consider a scenario where you need to determine the total amount sold by each salesperson from a large dataset containing multiple orders per salesperson. Manually calculating this information would be time-consuming. Fortunately, a PivotTable can instantly calculate and summarize the data, presenting it in an easily readable format.
Once a PivotTable is created, its data can be rearranged, or pivoted, to answer different questions. For instance, you could easily switch from "What is the amount sold by each salesperson?" to "What is the total amount sold in each month?".
Creating a PivotTable
Here's a step-by-step guide to creating a PivotTable:
Read also: Learn Forex Trading
- Select the Data: Choose the table or cells (including column headers) that you want to include in your PivotTable. Ensure the data is well-structured; converting the data range into an Excel Table (Insert > Table or Ctrl + T) is recommended. This ensures that the PivotTable automatically updates when new data is added to the spreadsheet. You may also want to give your Table a name (located on the left of the Table Design tab). The appearance of your Tables can be edited within the Table Design tab. Within this tab you can change appearance of your Table with preset Table Styles, or even opt to remove all formatting completely.
- Insert the PivotTable: From the Insert tab, click the PivotTable command. Alternatively, with data organized into a Table, it is time to insert a PivotTable. There are a couple of options: 1. Insert > PivotTable Click anywhere within your Table Navigate to the Insert Tab (top left of Excel spreadsheet) Select ‘PivotTable’ (or ‘Recommended PivotTables’)* 2. Table Design > Summarize with PivotTable Click anywhere within your Table Navigate to the Table Design tab (top right of Excel spreadsheet) Select ‘Summarize with PivotTable’ *‘Recommended PivotTables’ will provide recommendations for summarizing your data in a PivotTable. This is a good option if you are unsure of how to summarize your data.
- Choose Settings: The Create PivotTable dialog box will appear. Choose your settings, then click OK. You'll typically select the source data (the table or range) and choose whether to place the PivotTable on a new worksheet or an existing one. Within this box, you can select your Table or Range, if you have not done so already; the name of your Table would show here if you converted your data into a Table prior to inserting a PivotTable. Note: ‘Add this data to the Data Model’ will allow you to perform more complex tasks on your PivotTable, including the ability to create your own formulae within a PivotTable or the ability to link two or more PivotTables together based on a common attribute.
- PivotTable Fields Pane: A blank PivotTable and Field List will appear. The PivotTable Fields pane appears. The PivotTable Fields menu on the right-hand side of your workbook. This pane lists all the column headers from your source data, which are now referred to as fields.
Adding Fields to the PivotTable
Once the PivotTable is created, you'll need to decide which fields to add to it. Each field represents a column header from the source data.
- Select Fields: In the PivotTable Field List, check the box for each field you want to add. Alternatively, you can drag and drop fields directly into the desired area.
- Arrange Fields: The selected fields will be added to one of the four areas below:
- Rows: Fields placed here will appear as row labels in the PivotTable.
- Columns: Fields placed here will appear as column labels in the PivotTable.
- Values: Fields placed here will be summarized in the PivotTable (e.g., sum, average, count). By default, Excel summarizes your data by either summing or counting the items.
- Filters: Fields placed here can be used to filter the data displayed in the PivotTable. Because we added the Country field to the Filters area, we can filter this pivot table by Country.
Example: Analyzing Sales Data
Let's say you want to determine the total amount sold by each salesperson. You would check the "Salesperson" and "Order Amount" fields in the PivotTable Field List. The "Salesperson" field would be added to the Rows area, while "Order Amount" would be added to the Values area. The PivotTable will then calculate and display the total order amount for each salesperson.
Pivoting the Data
One of the key advantages of PivotTables is their ability to quickly reorganize data, allowing you to examine your worksheet from different perspectives.
Adding Columns
To add a column of data, drag a field from the Field List into the Columns area. For example, dragging the "Month" field into the Columns area would display the total amount sold each month for each salesperson.
Changing Rows and Columns
Changing a row or column can give you a completely different perspective on your data. Experiment with different arrangements to find the most insightful view.
Read also: Understanding the Heart
Removing Fields
To remove a field, drag it out of its current area or uncheck the corresponding box in the Field List.
Adjusting the PivotTable
The PivotTable will adjust to show the new data based on the fields you add, remove, or rearrange.
Formatting and Sorting
Just like with normal spreadsheets, you can sort the data in a PivotTable using the Sort & Filter command on the Home tab. You can also apply any type of number formatting you want. For example, you may want to change the number format to Currency.
Updating the PivotTable
If you change any of the data in your source worksheet, the PivotTable will not update automatically. To update the PivotTable, right-click anywhere within the PivotTable and select "Refresh".
Working with Dates
When you drag the Date data into the Columns field, the Columns field populates with Years, Quarters, and Date. This will occur automatically for dates (if the data are formatted properly as dates). But you may not want all these additional levels added to the PivotTable. For undesired labels, simply click and drag to remove. Note: Dates can be grouped by Seconds, Minutes, Hours, Days, Months, Quarters, and Years. By right-clicking on the Date labels in the PivotTable you will get a menu with the option ‘Group’. This will open a menu where you can select the grouping level you desire. If you do not want the data grouped, right-click on the Date labels in the PivotTable and click the ‘Ungroup’ option from the menu.
Read also: Guide to Female Sexual Wellness
Filters and Slicers
Filters and Slicers are used to filter data based on one or more variables. A Filter is a built-in drop-down menu within the PivotTable, while a Slicer is a separate filter menu that moves independently of the PivotTable. Both are used to filter data based on one or more variables. However, a Slicer has the added benefit of being able to link to multiple PivotTables.
Adding Multiple Variables
You can add as few, or many, variables as needed in each field (Filters, Rows, Columns, and Values). Note that with Columns, Rows, and Values the data will become nested and the PivotTable can become expansive quickly. Because PivotTables update quickly as you drag and drop variables into the different fields, I recommend experimenting with your PivotTables in the beginning. With experience and experimentation, you will get a better feel for how PivotTables should be organized to best summarize your data.
Enhancing PivotTable Design
If desired, you can accept the default PivotTable format. But, if you’re anything like me, you will want to change the PivotTable design as soon as possible. Luckily, this is simple. When clicked within your PivotTable, a Design tab will appear at the top right of the Excel workbook (next to PivotTable Analyze). Within this tab, you have the option of changing the style and colours of your PivotTable. You also have the option to insert headers, banded rows, and banded columns. Further, you have options to include or exclude data summaries (e.g., row or column totals). The Design tab will drastically improve the look of your PivotTables.
Grouping Data
Just as with dates, other variables can be grouped too. For example, with the ‘Rating of Care Received’ row labels, you may want to group the responses into fewer categories (e.g., Positive responses = Excellent, Very good; Neutral responses = Good, Fair; Negative responses = Poor, Very poor). To group the labels, highlight the labels you wanted grouped (e.g., Positive responses = Excellent, Very good) and right click. Navigate to the ‘Group’ option within the menu.
Connecting PivotTables with Slicers
It is possible to link multiple tables to the same Slicer. To link a Slicer to the two PivotTables, right click a Slicer that you have already created. From the menu, navigate and select Report Connections to bring up all potential connections for the Slicer. The list of Report Connections will list the different PivotTables for which it can connect. You will now have two PivotTables that can be filtered simultaneously with the click of button. Select any option within the Slicer and both PivotTables will update.
Pivot Charts
To easily compare these numbers, create a pivot chart and apply a filter.
Practical Applications
PivotTables can be used to:
- Summarize data (e.g., averages, counts, sums)
- Sort data (e.g., alphabetically, numerically)
- Group data (e.g., dates by month)
- Filter data (e.g., by department, by region)
tags: #pivot #tables #tutorial

