How to Create a Basic PivotTable in Microsoft Excel

Updated on September 30, 2019
Joshua Crowder profile image

Joshua has work experience in manufacturing, distribution, and aerospace. He received his BBA in accounting from Kent State University.

PivotTable

A PivotTable summarizes data from a data set. It's created when the PivotTable function sorts, averages, sums, and groups data. This function is useful when large amounts of data need to be looked at from different perceptions for decision making.
A PivotTable summarizes data from a data set. It's created when the PivotTable function sorts, averages, sums, and groups data. This function is useful when large amounts of data need to be looked at from different perceptions for decision making. | Source

What is a PivotTable?

A PivotTable allows an Excel user to create an dynamic report of data known as a PivotTable report. PivotTables are very effective at taking a vast amount of information and creating a meaningful presentation of that data as an output. Not only can PivotTables show data in multiple views, they can also be programmed with formulas to perform calculations. It's essentially a table that summarizes another table and is very helpful when it comes to making sense out of a large amount of data. A PivotTable consists of columns, rows, values, and filters which are summarized below.

PivotTable Construction

PivotTables take practice but building them is an easy concept. After a PivotTable is inserted, attributes (fields) of the source data are then organized into one or more sections of a PivotTable (columns section, values section, rows section, filters section) to create the table. Each section can be seen in the illustration below.

PivotTable Fields and Sections

After the PivotTable is created, the Excel user is given options to set up the PivotTable. Each field that is reported needs to be categorized as either a row, column, filter, or value to create the PivotTable.
After the PivotTable is created, the Excel user is given options to set up the PivotTable. Each field that is reported needs to be categorized as either a row, column, filter, or value to create the PivotTable.

PivotTable Sections

Column

The column section in a PivotTable represents the heading area that stretches from left to right along the top of the PivotTable. When data is added to the columns area the unique values relating to those columns can be displayed in the rows area. The column can be used to show a trend over time or a data matrix.

values

When source data needs to be calculated, counted, summed, or averaged, the values area can be utilized. When using the values area in a PivotTable the values being used are measured.

Rows

When data is dragged to the rows section the data displays on the left-hand side of the PivotTable. The Rows area may not have any field added to it but will typically have at least one field.

Filters

The filters area is optional for your data. This section allows you to filter the data however you see fit to convey a clear message about the data. The field that is dropped here is data that has focus on it. This data may need to be sorted or narrowed with a filter.

Collecting Data

The sample data shown below can be downloaded here if you would like to follow along with this PivotTable creation tutorial. This data set shows international statistical projects being performed around the globe. Columns display ID Number, Name, Country Code, Country, Region, and several more attributes.

PivotTable Sample Data

The table shown is the illustration above is a list of statistical projects and attributes of those projects.
The table shown is the illustration above is a list of statistical projects and attributes of those projects.

Creating a Simple PivotTable

To create a PivotTable, you need to have some type of source data. Source data should be data that represents records that have more than one column. If following along, open the spreadsheet in Microsoft Excel from the link above. Be sure to save the spreadsheet before working on it.

Select the insert tab and click on the PivotTable icon in the “Tables” group on the left-side of the ribbon. The Create PivotTable dialog box appears and needs data. If your data is already saved as a table selecting any cell within that table will add the whole table to the Table/Range field. Otherwise, select the complete range of your data for this field.

Next, decide if you want the PivotTable to be shown on a new sheet or on the current worksheet. If you want the PivotTable to show on the current worksheet, you’ll have to select which cell you want the table to start in. Since there is so much data in the example, I would like the PivotTable to have its own worksheet. After you decide, click OK.

Adding Source Data

When the "Create PivotTable" window appears, the table may be selected automatically. If not select the whole range of the table to add to the Table/Range field.
When the "Create PivotTable" window appears, the table may be selected automatically. If not select the whole range of the table to add to the Table/Range field.

Know Your Design

At this point, the PivotTable is empty. The next step is to populate the PivotTable using the PivotTable Field Pane. There are two very important questions to ask yourself before creating a PivotTable which are: “What data to I want to display?” and “How to I want to display it?” to determine which fields go where.

Blank PivotTable

This is what the Excel Workbook should look like at this point. The PivotTable above is ready to be designed and will display values once fields are dropped into filters, rows, columns, and values.
This is what the Excel Workbook should look like at this point. The PivotTable above is ready to be designed and will display values once fields are dropped into filters, rows, columns, and values.

My PivotTable Design

For this PivotTable I would like to see the sum of the total loan amount and the project name associated with that value. I would also like to filter out any records that have loan amounts under $10 million dollars and see each value categorized by region in a matrix type format.

First, I will establish a value (loan amount) for the PivotTable. The total loan amount needs to be dragged from the fields list to the value section. This value will appear as a sum. Since each record is unique, there will be no sum. If there were records with the same project name, they would be combined and a sum of the two would be displayed.

Next, the project name needs to be dragged from the fields list to the rows section. You'll notice that the PivotTable side bar disappears after it was edited the first time. To get the side bar to appear again right click on any header in the PivotTable and select "View Field Settings." The illustration below shows what the PivotTable should look like after adding the project name to rows.

The above result shows the project name with the sum loan amount. Note that each record is distinct so there really is no sum of this attribute. If another record were added that matched an existing project name, the loans would sum.
The above result shows the project name with the sum loan amount. Note that each record is distinct so there really is no sum of this attribute. If another record were added that matched an existing project name, the loans would sum.

Next, I would like to filter out any loan amounts under $100 million dollars. To do this I will need to drag the loan amount field to the filters section of the PivotTable. As a result, a filter is added to the PivotTable for that field. When I click on the drop down that is located on the new header "Row Labels," I must choose the option "Value Filters," then click on greater than or equal to. See the operation in the illustration below.

The values filter requires a value that will filter out any values below it. Since I need to display $100 million in loans and above, I will added 100 to the field.

The PivotTable below shows the data after being filtered.

Now that I have only the high value loans of $100 million and more, I'd like to show each value by region. The goal is to create a matrix that will categorize each loan value by region. To do this the regions field value needs to be added to the columns section. The resulting table is shown below.

Insert a Graphical Representation of the PivotTable

Sometimes having a graph of the PivotTable will help you compare categorized data and high and low values. We will see both after graphing this PivotTable. To insert a chart, click on Analyze located under the PivotTable Tool section of the ribbon. Now find and click on the insert Pivot Chart button.

Choosing the Right Chart

Based on the type of data in the chart Excel will decide what type of chart will be available for your PivotTable. In this case I can only select between bar charts and pie charts. The best visual representation of this data would come in the form of a clustered bar chart.

Clustered Bar Chart

With the clustered bar chart each project can be compared. The chart was automatically color coded by region when it was selected.
With the clustered bar chart each project can be compared. The chart was automatically color coded by region when it was selected.

Conclusion

This PivotTable could have been displayed dozens of different ways. Depending on your goals for reporting the data, the table will need to be structured differently. In most cases with a PivotTable, some trial and error will be involved in the design of the table. To get good practice at these tables it’s best to try to come up with as many different table styles as you can to get a feel for the PivotTable function.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.

Questions & Answers

    © 2018 Joshua Crowder

    Comments

      0 of 8192 characters used
      Post Comment

      No comments yet.

      working

      This website uses cookies

      As a user in the EEA, your approval is needed on a few things. To provide a better website experience, turbofuture.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

      For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://turbofuture.com/privacy-policy#gdpr

      Show Details
      Necessary
      HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
      LoginThis is necessary to sign in to the HubPages Service.
      Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
      AkismetThis is used to detect comment spam. (Privacy Policy)
      HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
      HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
      Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
      CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
      Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
      Features
      Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
      Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
      Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
      Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
      Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
      VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
      PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
      Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
      MavenThis supports the Maven widget and search functionality. (Privacy Policy)
      Marketing
      Google AdSenseThis is an ad network. (Privacy Policy)
      Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
      Index ExchangeThis is an ad network. (Privacy Policy)
      SovrnThis is an ad network. (Privacy Policy)
      Facebook AdsThis is an ad network. (Privacy Policy)
      Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
      AppNexusThis is an ad network. (Privacy Policy)
      OpenxThis is an ad network. (Privacy Policy)
      Rubicon ProjectThis is an ad network. (Privacy Policy)
      TripleLiftThis is an ad network. (Privacy Policy)
      Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
      Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
      Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
      Statistics
      Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
      ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
      Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
      ClickscoThis is a data management platform studying reader behavior (Privacy Policy)