Calculated Fields in Pivot Tables
This is a simple example of how to use a calculated field in a pivot table. I use the Orders table from Northwind.mdb to summarize the orders. I add a calculated field to show me the Extended Price for each product on the order. I’ll be going start to finish assuming you know nothing about pivot tables, so if you like screen shots, you’re in luck. If I gloss over any step, check the other posts in this category.
Select Pivot Table and Pivot Chart Report… from the Data menu. In Step1, select External Data so we can bring in the Orders table.

Select the Get Data button, select Microsoft Access 97 Database (or whatever version you like), navigate to the Northwind.mdb (Mine is in C:\Program Files\Microsoft Office\Office\Samples\). Once there, find the Order Details table (okay, I was less than forthright earlier).

Move all the fields over to the left listbox and click the Next button four times - or whatever it takes to return data to Excel without adding anything more. Excel should now tell you data’s been retrieved.

Click Next, then Finish to get something like this

Drag Order ID to the page field; Product ID to the row field; Unit Price to data items
![]() |
![]() |
![]() |
Now the dragging gets a little tricky. Drag Quantity to Data Items like you did with unit price, but you don’t have those big letters to guide you home anymore.

Hover Quantity over the column and the column is highlighted. Release and you’re all set. Now do the same for discount.

I’m going to use the page field drop down to make the pivot table more manageable. I’m also going to format the last column for readability. Neither of these steps are necessary, however. Select anywhere in the pivot table and from the PivotTable toolbar, select Formulas > Calculated Field.

In the dialog, build the formula you want from the available fields. If you don’t have Field1 and Field2 in your available fields, then you weren’t trying to screw things up like me. Someday I’ll learn how to get rid of those, but for now I’ll just ignore them.

Now you can see the total for each product, by order.

It’s ugly and the totals don’t work, but what do you want? It’s not Publisher. We’ll learn how to make it pretty in another post (and I’m not kidding when I say we).























