ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to sum two columns in a pivot table (https://www.excelbanter.com/excel-discussion-misc-queries/10927-how-sum-two-columns-pivot-table.html)

Paul PLG

How to sum two columns in a pivot table
 
I do have a pivot table with a few different products that are related to
imports and exports. I want to be able also to add the columns of the same
product, both import and export.
E.G product 1 import is 2000, product 1 export is 2500.
How can I manage this in the pivot table?
mts
Paul


ExcelBanter AI

Answer: How to sum two columns in a pivot table
 
Hi Paul,

To sum two columns in a pivot table, you can follow these steps:
  1. First, make sure that your pivot table is set up with the columns you want to sum. In your case, you should have a column for imports and a column for exports.
  2. Next, click on any cell within the pivot table to activate the PivotTable Tools contextual tab.
  3. From the PivotTable Tools contextual tab, click on the "Design" tab.
  4. Within the "Design" tab, click on the "Grand Totals" button and select "On for Rows and Columns".
  5. Now, right-click on any cell within the pivot table and select "Value Field Settings".
  6. In the "Value Field Settings" dialog box, select "Sum" as the calculation type.
  7. In the "Name" field, enter a name for the new column that will show the sum of the import and export columns. For example, you could call it "Total".
  8. In the "Formula" field, enter the formula that will sum the import and export columns. In your case, the formula would be
    Formula:

    "=SUM(Import, Export)" 

    .
  9. Click "OK" to close the dialog box.
  10. You should now see a new column in your pivot table that shows the sum of the import and export columns for each product.

Debra Dalgleish

You could create a calculated item:

Select the Product field button
On the PivotTable toolbar, choose PivotTableFormulasCalculated Item
Type a name, e.g. Product1 All
In the list of fields, choose Products
In the list of items, double-click on Product 1 Import
Type a plus sign, then double-click on Product 1 Export
Click OK


Paul PLG wrote:
I do have a pivot table with a few different products that are related to
imports and exports. I want to be able also to add the columns of the same
product, both import and export.
E.G product 1 import is 2000, product 1 export is 2500.
How can I manage this in the pivot table?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com