How to Calculate Weighted Average in Excel Pivot Table

We have a dataset containing different grocery items and their sale details. We will calculate the weighted average price for each item in a Pivot Table.

Dataset Introduction


Step 1 – Adding a Helper Column

  • Add a column Sales Amount in the above table.
  • Use the following formula in the first cell of this new column.
=D5*E5
  • Hit Enter.

Adding Extra Column

  • Use the Fill Handle (+) tool to copy the formula to the rest of the column.

Adding Extra Column

  • You will get the following result.


Step 2 – Creating the Excel Pivot Table

  • Click on any cell of the dataset (B4:F14).

Creating Excel Pivot Table

  • Go to Insert and choose Pivot Table, then select From Table/Range.

Creating Excel Pivot Table

  • The PivotTable from table or range window will pop up. If your Table/Range field is correct, press OK.

Creating Excel Pivot Table

  • The Pivot Table is created in a new sheet. Choose the PivotTable Fields as in the screenshot.

Creating Excel Pivot Table

  • You will get the following Pivot Table.


Step 3 – Analyzing the Weighted Average in an Excel Pivot Table

  • Select the Pivot Table.
  • Go to Pivot Table Analyze.
  • Choose Field, Items, & Sets and select Calculated Field.

Analyzing Weighted Average Excel Pivot Table

  • The Insert Calculated Field window will show up.
  • Type Weighted Average in the Name field.
  • We have divided the helper column by weight (Sales Amount/Weight) to get the weighted average.
  • Click on OK.

  • We got the weighted average price for each of the grocery items in the subtotal rows of our Pivot Table.

Read More: Pivot Table Calculated Field for Average in Excel


Download the Practice Workbook


Related Articles


<< Go Back to Pivot Table Calculations | Pivot Table in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Hosne Ara
Hosne Ara

Hosne Ara is a materials and metallurgical engineer who loves exploring Excel and VBA programming. To her, programming is like a time-saving superhero for dealing with data, files, and the internet. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. With a B. Sc. in Materials and Metallurgical Engineering from Bangladesh University of Engineering and Technology, she's shifted gears and now works as a content developer. In this role, she... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo