Recently I set up a Pivot Table in Excel which shows inventory purchased and inventory sold for my business. I would like to add a simple calculation in the Pivot Table showing the difference between the amount purchased and amount sold, giving me my on hand inventory.
Can a calculation be added to a Pivot Table once it has been set up?
| Item | Data | Total | |
| Blue Candle | Sum of Purchased | 50 | |
| Sum of Sold | 12 | ||
| Blue Votive | Sum of Purchased | 75 | |
| Sum of Sold | 42 | ||
| Cream Votive | Sum of Purchased | 75 | |
| Sum of Sold | 27 | ||
| Gold Candle | Sum of Purchased | 50 | |
| Sum of Sold | 2 | ||
| Green Candle | Sum of Purchased | 50 | |
| Sum of Sold | 11 | ||
| Red Candle | Sum of Purchased | 50 | |
| Sum of Sold | 27 | ||
| White Votive | Sum of Purchased | 75 | |
| Sum of Sold | 38 | ||
| Total Sum of Purchased | 425 | ||
| Total Sum of Sold | 159 | ||
- Login or Signup Now to post comments

Even though the Pivot Table has already been set-up, through drag-n-drop, criteria can be manipulated. The process are as follows:
If you want to change the formula of an item you have to:
Hope this helps.
In excel it is impossible to add calculation or formula directly to a pivot table. You can add a calculation in to a cell which is out of the pivot table as shown in the below image but you will not be able to copy that formula to the other cell.
If you copied it to other cells, it will show the same result which is in the first cell.
However, you can add a calculation to the data source which you can get the on hand inventory and then it is possible to add that field to pivot table as follows.
First get the on hand inventory to the data source by adding a new column as on hand inventory and type a formula to get the balance inventory (purchase quantity – sold quantity).
Then go to the “options” tab and click on the “change data source” on Data section (Step 1).
Then select the entire data source including new on hand inventory column and click ok (step 2).
Then go to the “options” tab and click on the “Field list” in show/hide section.
Drag the “on hand inventory” field and put it to Values field.
Make the “on hand inventory “field to sum format.
Now you will be able to see the “on hand inventory” column in pivot table as follows.