Pivot Table custom calculations

J

Jeffrey

I posted earlier this morning, but am still having
difficulty with this question. I'm not sure if I
wasn't totally clear when describing my pivot table setup
or if I'm just not understanding the directions that were
given, but I need a little more clarification.

I'm trying to incorporate a custom calculation in a
pivot table, but have been unable to get it to work. I
checked Excel's help under "About formulas in PivotTable
and Pivot Chart reports" and thought the section within:
-Formula syntax
-Field names in item references
seemed like the right approach. The pivot table is set up
similar to this:

Shipped Ordered Forecast
Sales Cost Sales Cost Sales Cost
Customer
Cust 1 10 5 20 12 32 15
Cust 2 20 11 25 15 40 12
Cust 3 15 8 15 10 30 15
and so on...

My row area contains the field 'Customer'. My column area
contains the field 'Sales Status', which includes
(Shipped, Ordered, and Forecast). My data area includes
Sales and Costs. Can I create a formula that will specify
items within certain fields? For instance, I would like
to create a formula that will calculate the difference in
margin between the sum of (Shipped and Ordered) and the
Forecast. Another simple example of a formula would be
(Shipped Sales+Ordered Sales)-(Forecast Sales). To say it
another way, it would be (Sales within the Shipped
category + Sales within the Ordered category) - (Sales
within the Forecast category).

Any further assistance would be greatly appreciated.
 
D

Debra Dalgleish

Select the button for the Status field
From the Pivot toolbar, choose PivotTable>Formulas>Calculated Item
Type a name for the Formula, e.g. DiffForecast
In the Formula box, enter:
=Forecast - (Shipped + Ordered)
Click OK
The new item will be added to the pivot table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top