Note: The other languages of the website are Google-translated. Back to English
Log in  \/ 
Register  \/ 


How to calculate weighted average in an Excel Pivot Table?

In general, it’s easy to calculate the weighted average by combination of SUMPRODUCT and SUM functions in Excel. However, the calculated fields seem not support the functions in a pivot table. Therefore, how could you calculate the weighted average in a pivot table? This article will introduce a solution.

Calculate weighted average in an Excel Pivot Table

Calculate weighted average in an Excel Pivot Table

Supposing you have created a pivot table as below screenshot shown. And I will take the pivot table as example to calculate the weighted average price of each fruit in the pivot table.

1. First of all, add a helper column of Amount in the source data.
Insert a blank column in the source data, type Amount as column name, next type =D2*E2 in the first cell of this helper column, and finally drag the AutoFill Handle to fill the whole column. See screenshot:

2. Select any cell in the pivot table to activate the PivotTable Tools, and then click Analyze (or Options) > Refresh. See screenshot:

3. Go ahead to click Analyze > Fields, Items, & Sets > Calculated Field. See screenshot:

4. In the Insert Calculated Field dialog box, please type Weight Average in the Name box, type =Amount/Weight (please change the formula based on your field names) in the Formula box, and then click the OK button. See screenshot:

Now you return to the pivot table, and you will get the weighted average price of each fruit in the subtotal rows. See screenshot:

Related articles:

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    amanda · 1 months ago
  • To post as a guest, your comment is unpublished.
    Rodolfo · 10 months ago
    THANK YOU! Love it. It works for me at multiple level. Genius way to solve an issue in a simple way.
  • To post as a guest, your comment is unpublished.
    PG · 1 years ago
    This just wrong I think. Why is the average and wrigher average the same number? Multiplying and divining just cancel out and you are left with the same result. Grrrr..
  • To post as a guest, your comment is unpublished.
    lil_Butterfly · 2 years ago
    Awesome! Never thought of a helper column lol
  • To post as a guest, your comment is unpublished.
    Meeeee · 3 years ago
    i like it, but what if you need to add extra conditions?
    • To post as a guest, your comment is unpublished.
      kellytte · 3 years ago
      Hi Meeeee,
      What kinds of conditions will you add? In most cases, you can update your source table, refresh the PivotTable, and then add calculated fields.
  • To post as a guest, your comment is unpublished.
    Heber · 3 years ago
    Te la rifaste campeón, denle una cerveza bien fría a este hombre.