Calculated Fields in Pivot Table

KarlSch

New Member
Joined
May 22, 2009
Messages
6
Hi

I am trying to calculated a weigted average age in a pivot table.

My input data looks something like this:

Age Type Count
30 1 10
30 2 1
30 3 4
40 1 20
40 2 5
40 3 10


And I want a pivot table that lists:

Type Average Age
1 sumproduct(Age,Count)/sum(Count) = 36.67
2 "
3 "


Anyone know how I can achieve this?


Thanks
Karl
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You would have to add a column to the data source that multiplies the two columns together. Then in the table create a calculated field that divides that new column by the count column.
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top