How to Do Pivot Tables in Excel

I have always struggled with creating pivot tables in Excel. My university professors told me that I could create them, but I just could not get them to do it correctly. One of the biggest challenges was entering the data into the cells, which Excel does automatically. After years of being frustrated by creating pivot tables, I finally found out how to do this quickly and easily.

Pivot Tables

Insert a Pivot Table | Drag fields | Sort | Filter | Change Summary Calculation | Two-dimensional Pivot Table

Pivot tables are one of Excel‘s most powerful features. A pivot table allows you to extract the significance from a large, detailed data set.

Our data set consists of 213 records and 6 fields. Order ID, Product, Category, Amount, Date and Country.

Pivot Table Data in Excel

https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-1987061359047735&output=html&h=280&slotname=2884421292&adk=3370245685&adf=491445963&pi=t.ma~as.2884421292&w=336&lmt=1636210954&rafmt=12&psa=1&format=336×280&url=https%3A%2F%2Fwww.excel-easy.com%2Fdata-analysis%2Fpivot-tables.html&flash=0&wgl=1&uach=WyJXaW5kb3dzIiwiOC4wLjAiLCJ4ODYiLCIiLCI5NS4wLjQ2MzguNjkiLFtdLG51bGwsbnVsbCwiNjQiXQ..&dt=1636248173243&bpp=14&bdt=3114&idt=14960&shv=r20211103&mjsv=m202111020101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D7bdac4d896077692-22c9baa630cb0073%3AT%3D1636243636%3ART%3D1636243636%3AS%3DALNI_MYSm0cGfe3jzoQeF5_T_QK1Hpy5SQ&prev_fmts=0x0&nras=1&correlator=7583845648066&frm=20&pv=1&ga_vid=13165688.1636243627&ga_sid=1636248188&ga_hid=471463456&ga_fc=1&u_tz=60&u_his=3&u_h=768&u_w=1366&u_ah=738&u_aw=1366&u_cd=24&adx=208&ady=601&biw=1349&bih=635&scr_x=0&scr_y=0&eid=31062423%2C21067496&oid=2&pvsid=2146267754249225&pem=63&ref=https%3A%2F%2Fwww.google.com%2F&eae=0&fc=1920&brdim=0%2C0%2C0%2C0%2C1366%2C0%2C0%2C0%2C1366%2C635&vis=2&rsz=%7C%7CaeEr%7C&abl=CA&pfx=0&fu=256&bc=31&ifi=2&uci=a!2&fsb=1&xpc=hXBfdQoD6B&p=https%3A//www.excel-easy.com&dtd=14980

Insert a Pivot Table

To insert a pivot table, execute the following steps.

1. Click any single cell inside the data set.

2. On the Insert tab, in the Tables group, click PivotTable.

Insert Excel Pivot Table

The following dialog box appears. Excel automatically selects the data for you. The default location for a new pivot table is New Worksheet.

3. Click OK.

Create PivotTable Dialog Box

Drag fields

The PivotTable Fields pane appears. To get the total amount exported of each product, drag the following fields to the different areas.

1. Product field to the Rows area.

2. Amount field to the Values area.

3. Country field to the Filters area.

Drag Fields to Areas

Below you can find the pivot table. Bananas are our main export product. That’s how easy pivot tables can be!

Pivot Table

Sort

To get Banana at the top of the list, sort the pivot table.

1. Click any cell inside the Sum of Amount column.

2. Right click and click on Sort, Sort Largest to Smallest.

Sort Largest to Smallest

Result.

Sorted Pivot Table

https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-1987061359047735&output=html&h=280&slotname=2529116896&adk=2919002958&adf=3372842255&pi=t.ma~as.2529116896&w=336&lmt=1636210954&rafmt=12&psa=1&format=336×280&url=https%3A%2F%2Fwww.excel-easy.com%2Fdata-analysis%2Fpivot-tables.html&flash=0&wgl=1&adsid=ChEI8M-YjAYQ2Ozu7er9wMj6ARI5AKDLW9TEVKj-JzQs5SCReLMhdLSUzQA6xKdPz16SNX3n5YQN6IYGonVXUVHs39JS2tC4k0Arl7sG&uach=WyJXaW5kb3dzIiwiOC4wLjAiLCJ4ODYiLCIiLCI5NS4wLjQ2MzguNjkiLFtdLG51bGwsbnVsbCwiNjQiXQ..&dt=1636248173257&bpp=2&bdt=3128&idt=15095&shv=r20211103&mjsv=m202111020101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D7bdac4d896077692-22c9baa630cb0073%3AT%3D1636243636%3ART%3D1636243636%3AS%3DALNI_MYSm0cGfe3jzoQeF5_T_QK1Hpy5SQ&prev_fmts=0x0%2C336x280&nras=1&correlator=7583845648066&frm=20&pv=1&ga_vid=13165688.1636243627&ga_sid=1636248188&ga_hid=471463456&ga_fc=1&u_tz=60&u_his=3&u_h=768&u_w=1366&u_ah=738&u_aw=1366&u_cd=24&adx=208&ady=3346&biw=1349&bih=635&scr_x=0&scr_y=820&eid=31062423%2C21067496&oid=2&psts=AGkb-H-pfp8n2aZtm7rkzLoCS9B9Bbu1-6NjoCQjO-7tLqNZ4PZAhwmCFZe3OfWs-5O7gq0qMqxZt7FtH9Or1V0&pvsid=2146267754249225&pem=63&ref=https%3A%2F%2Fwww.google.com%2F&eae=0&fc=1920&brdim=0%2C0%2C0%2C0%2C1366%2C0%2C1366%2C738%2C1366%2C635&vis=1&rsz=%7C%7CaeEbr%7C&abl=CA&pfx=0&fu=256&bc=31&jar=2021-11-06-18&ifi=3&uci=a!3&btvi=1&fsb=1&xpc=Lk1b2UxJ8r&p=https%3A//www.excel-easy.com&dtd=26479

Filter

Because we added the Country field to the Filters area, we can filter this pivot table by Country. For example, which products do we export the most to France?

1. Click the filter drop-down and select France.

Result. Apples are our main export product to France.

Filtered Pivot Table

Note: you can use the standard filter (triangle next to Row Labels) to only show the amounts of specific products.

Change Summary Calculation

By default, Excel summarizes your data by either summing or counting the items. To change the type of calculation that you want to use, execute the following steps.

1. Click any cell inside the Sum of Amount column.

2. Right click and click on Value Field Settings.

Value Field Settings

3. Choose the type of calculation you want to use. For example, click Count.

Summarize Value Field By

4. Click OK.

Result. 16 out of the 28 orders to France were ‘Apple’ orders.

Count

Two-dimensional Pivot Table

If you drag a field to the Rows area and Columns area, you can create a two-dimensional pivot table. First, insert a pivot table. Next, to get the total amount exported to each country, of each product, drag the following fields to the different areas.

1. Country field to the Rows area.

2. Product field to the Columns area.

3. Amount field to the Values area.

4. Category field to the Filters area.

Create Two-dimensional Pivot Table

Below you can find the two-dimensional pivot table.

Two-dimensional Pivot Table in Excel

To easily compare these numbers, create a pivot chart and apply a filter. Maybe this is one step too far for you at this stage, but it shows you one of the many other powerful pivot table features Excel has to offer.

Pivot Chart

https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-1987061359047735&output=html&h=280&slotname=4005850092&adk=660647165&adf=2345183727&pi=t.ma~as.4005850092&w=336&lmt=1636210954&rafmt=12&psa=1&format=336×280&url=https%3A%2F%2Fwww.excel-easy.com%2Fdata-analysis%2Fpivot-tables.html&flash=0&wgl=1&adsid=ChEI8M-YjAYQ2Ozu7er9wMj6ARI5AKDLW9TEVKj-JzQs5SCReLMhdLSUzQA6xKdPz16SNX3n5YQN6IYGonVXUVHs39JS2tC4k0Arl7sG&uach=WyJXaW5kb3dzIiwiOC4wLjAiLCJ4ODYiLCIiLCI5NS4wLjQ2MzguNjkiLFtdLG51bGwsbnVsbCwiNjQiXQ..&dt=1636248173259&bpp=2&bdt=3131&idt=15105&shv=r20211103&mjsv=m202111020101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D7bdac4d896077692-22c9baa630cb0073%3AT%3D1636243636%3ART%3D1636243636%3AS%3DALNI_MYSm0cGfe3jzoQeF5_T_QK1Hpy5SQ&prev_fmts=0x0%2C336x280%2C336x280&nras=1&correlator=7583845648066&frm=20&pv=1&ga_vid=13165688.1636243627&ga_sid=1636248188&ga_hid=471463456&ga_fc=1&u_tz=60&u_his=3&u_h=768&u_w=1366&u_ah=738&u_aw=1366&u_cd=24&adx=208&ady=6756&biw=1349&bih=635&scr_x=0&scr_y=4220&eid=31062423%2C21067496&oid=2&psts=AGkb-H-pfp8n2aZtm7rkzLoCS9B9Bbu1-6NjoCQjO-7tLqNZ4PZAhwmCFZe3OfWs-5O7gq0qMqxZt7FtH9Or1V0%2CAGkb-H8-lC_jgp3CXB53m9grcmmnVtJnPMfeiw6P7-OQTQvfnSkqOPa9QACziLsEIhNtR7duG5JCpRCx37Uk7mk&pvsid=2146267754249225&pem=63&ref=https%3A%2F%2Fwww.google.com%2F&eae=0&fc=1920&brdim=0%2C0%2C0%2C0%2C1366%2C0%2C1366%2C738%2C1366%2C635&vis=1&rsz=%7C%7CaeEbr%7C&abl=CA&pfx=0&fu=256&bc=31&jar=2021-11-06-18&ifi=4&uci=a!4&btvi=2&fsb=1&xpc=l6jC6257Vv&p=https%3A//www.excel-easy.com&dtd=33251

Conclusions

Pivot tables are an excel feature that can help you analyze large spreadsheets with ease. A pivot table is basically a customized spreadsheet summary. Instead of having to analyze each row manually, you can create a pivot table that will do it for you automatically. I remember the first time I used a pivot table in Excel years ago and was amazed at how much time it saved me. I use them all the time now, so hopefully this post will help you take advantage of the great tool Pivot tables are.

Leave a Comment