Pivot Table: Calculating a product of two columns?

donc

New Member
Joined
Aug 8, 2008
Messages
16
Can I do something with field settings to calculate the product of two cells in the same row of data? I.e. I want my quotes column to produce the product of the the same quotes column and the location counts column in the same row of data...Am I thinking correctly that I should/may be able to do that with field settings?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
It depends on your table. YOu can use calcualted fields to multiply one field by another, but it will work at an aggregate level for any subtotals, in the sense that instead of getting:
Sum(fieldA * fieldB)
you will get:
Sum(fieldA) * sum(FieldB)

For detail rows, it will be correct though.
 
Upvote 0
Hi,

Save the data file and (for simplicity) give the data and headers a defined name, not dynamic. Then from a new workbook to create the pivot table and at the first step of the wizard take the external data option. Follow the wizard and at the end take the option to edit in MS Query you can edit the SQL there - hit the SQL button - and add the calculated field there. SQL like below. Exit & complete pivot table. Move the resultant sheet back into the source file if you like. (It is created in a new file to avoid memory leak problems.)

HTH, Fazza

Code:
SELECT Quote*LocationCount AS [New Name]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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