Standard Pivot Tables have a simple feature for creating calculated items. You can think of a calculated item as "virtual rows" in the source data. A calculated item will not appear in the field list window. Instead, it will appear as an item in the field for which it is defined. In the example shown, a calculated item called "Southeast" has been created with a formula that adds South to East. The pivot table displays the correct regional totals, including the new region "Southeast".
Fields
The source data contains three fields: Date, Region, and Sales. Note the field list does not include the calculated item.
The calculated item was created by selecting "Insert Calculated Item" in the "Fields, Items, and Sets" menu on the ribbon:
The calculated field is named "Southeast" and defined with the formula "=South + East" as seen below:
Note: Field names with spaces must be wrapped in single quotes ('). Excel will add these automatically when you click the Insert Field button or double-click a field in the list.
After the calculated item is created, the East and South regions must be excluded with a filter to avoid double-counting:
Steps
- Create a pivot table
- Add Region as a Row field
- Add Sales as a Value field
- Create the Calculated item "Southeast"
- Filter Region to exclude East and South