How to Create a Pivot Table in Excel: A Simple Tutorial

How to Create a Pivot Table in Excel

Pivot tables are a powerful feature in Microsoft Excel that allows you to summarize and analyze large datasets. They enable you to transform rows and columns of data into meaningful insights without altering the original data. This article will explore How to Create a Pivot Table in Excel.

What is a Pivot Table?

A pivot table is a table that displays the results of calculations on data from another table. The calculations are based on the fields that you choose to include in the pivot table. Furthermore, you can arrange the fields in different ways to create different views of your data.

The main components of a pivot table are:

  • Row fields: These are the fields that appear as rows in the pivot table.  These are the criteria for categorizing your data.
  • Column fields: These are the fields that appear as columns in the pivot table, which you want to break down your data by.
  • Value fields: These are the fields that contain the data that you want to summarize or analyze. They appear as cells in the pivot table. You can apply different functions to these fields, such as sum, count, average, etc.
  • Filter fields: These are the fields that allow you to filter your data based on certain criteria. They appear as drop-down menus above the pivot table. You can use them to show or hide specific values or categories.

How to Create a Pivot Table in Excel

To create a pivot table in Excel, you need a source data set that is organized in a tabular format. This means that your data should have:

  • A single row of headers at the top with unique and descriptive labels for each column
  • No empty rows or columns
  • No merged cells or double headers
  • There are no subtotals or totals within the data

You can also format your data as an Excel table by selecting it and clicking Insert > Table from the ribbon. This will make it easier to manage and update your data.

Once you have your source data ready, follow these steps to create a pivot table:

  • Select any cell in your source data or Excel table.
  • Go to the Insert tab and click PivotTable in the Tables group.
  • In the Create PivotTable dialog box, verify the range of cells or table name in the Table/Range box. You can also change the location of your pivot table by selecting New Worksheet or Existing Worksheet and specifying a cell address.
  • If you want to use multiple tables or external data sources for your pivot table, you can check the Add this data to the Data Model box. This will enable you to use Power Pivot features and create relationships between tables.
  • Click OK to create your pivot table.

How to Build or Edit a Pivot Table

After creating your pivot table, you will see a blank grid on your worksheet and a PivotTable Fields pane on the right side of your screen.

The PivotTable Fields pane has four areas:

  • Filters: This is where you can place fields that you want to use as filters for your pivot table. You can use these filters to show or hide specific values or categories from your data.
  • Columns: This is where you can place fields that you want to use as column labels for your pivot table. You can use these columns to break down your data by subcategories.
  • Rows: This is where you can place fields that you want to use as row labels for your pivot table. You can use these rows to group your data.
  • Values: This is where you can place fields that contain the data that you want to summarize or analyze in your pivot table. 

To build or edit your pivot table, follow these steps:

  • In the Pivot Table Fields pane, check the boxes next to the fields that you want to include in your pivot table. You can also drag and drop them into different areas.
  • To change the order of the fields within an area, drag and drop them up or down.
  • To remove a field from an area, uncheck its box or drag and drop it out of the area.
  • Moreover, to change the function applied to a value field, click the drop-down arrow next to its name and select Value Field Settings. In the Value Field Settings dialog box, select a function from the Summarize Value Field by List list and click OK.
  • In addition, to rename a field, click its name and type a new name.

How to Filter or Sort a Pivot Table

You can filter or sort your pivot table to display only the data that you want to see. There are two ways to do this:

  • Using the filter buttons on the pivot table: These are drop-down arrows that appear next to each field name in the pivot table. Moreover, you can click them to open a menu that allows you to filter or sort the values or categories for that field. You can also search for specific items or use slicers or timelines to filter your data visually.
  • Using the sort and filter options on the ribbon: These are buttons that appear on the Data tab when you select a cell in your pivot table. You can use them to sort or filter your data by values, labels, color, or custom lists.

To filter or sort your pivot table, follow these steps:

  • Select a cell in your pivot table that contains the field that you want to filter or sort.
  • To use the filter buttons on the pivot table, click the drop-down arrow next to the field name and select the options that you want from the menu. Additionally, you can also click More Sort Options or More Filter Options to access more advanced settings.
  • To use the sort and filter options on the ribbon, go to the Data tab and click Sort or Filter in the Sort & Filter group. Moreover, select the options that you want from the menu or dialog box.

Changing the Number Format of the Value Fields

By default, the pivot table uses the General number format for the value fields. In addition, this means that the values are displayed as they are in the source data, without any decimals, commas, or currency symbols. Additionally, you can change the number format for all the value fields or for a specific value field.

To change the number format for all the value fields, follow these steps:

  1. Right-click any cell in the pivot table and select Number Format from the shortcut menu.
  2. In the Format Cells dialog box, choose a category from the list and adjust the settings as you like. For example, you can choose Currency and specify two decimal places and a currency symbol.
  3. Click OK to apply the number format to all the value fields.

To change the number format for a specific value field, follow these steps:

  • Right-click any cell that contains the value field that you want to format and select Value Field Settings from the shortcut menu.
  • In the Value Field Settings dialog box, click Number Format.
  • In the Format Cells dialog box, choose a category from the list and adjust the settings as you like. For example, you can choose percent and specify zero decimal places.
  • Click OK twice to apply the number format to the selected value field.

Applying a Predefined Style 

Excel provides several predefined styles that you can apply to your pivot table to change its appearance. Additionally, you can also create your own custom style by modifying the colors, fonts, borders, and other elements of an existing style.

To apply a predefined style to your pivot table, follow these steps:

  • Select any cell in your pivot table to activate the PivotTable Tools tabs on the ribbon.
  • Go to the Design tab and click the More button in the PivotTable Styles gallery to see all available styles.
  • Pick the style that you want to use. Moreover, you can hover over each style to see a preview of how it will look on your pivot table.

If you want to know about Excel Spreadsheet Templates to improve your business let’s look into this article.

Conclusion

Pivot tables are a great way to explore and analyze your data in Excel. In addition, you can create a pivot table from any tabular data set and customize it to suit your needs. Furthermore, You can also filter or sort your pivot table to display only the data that you want to see.

FAQs

Q1: Can I create a pivot table with multiple data sources?

Yes, you can create a pivot table with data from multiple sources, as long as they share a common field.

Q2: What is the maximum number of fields I can add to a pivot table?

Excel supports up to 16,384 columns in a pivot table.

Q3: Can I undo changes made to a pivot table?

Yes, you can undo and redo changes within your pivot table.

Q4: Are pivot tables available in all versions of Excel?

Pivot tables are available in most versions of Excel, including Excel 2010 and later.

Q5: Do pivot tables alter my original data?

No, pivot tables do not alter your original data. They provide a summarized view for analysis.

Leave a Reply

Your email address will not be published. Required fields are marked *