Defining the Data Fields within the
PivotTable View
Remaining within the Queries section of the Database
window, let's take the following steps to begin construction of our new
PivotTable view.
-
Click the new General
Customer Orders query to select it
-
Click Open
on the Database window toolbar to run and display the query.
-
Select View -->
PivotTable View from the main menu.
After a few seconds, the blank PivotTable appears, with a floating PivotTable
Field List appearing in the foreground, as depicted in Illustration 8.
Illustration 8: A Blank PivotTable View Appears
We discovered in our previous lesson how the PivotTable
allows us to define the data values that we wish to occupy multiple rows,
columns, pages and summaries. Let's define our view to effectively present the
data set returned from our new query, in preparation for transforming that
presentation to the more graphic PivotChart view.
NOTE: If the PivotTable Field List does
not appear, initialize it clicking the Field List button, shown in Illustration
9, on the toolbar.
Illustration 9: The PivotTable Field List Button
- In the Field List, click Region to highlight
it.
- Select Filter Area in the selector box, to the
right of the Add to button (at the bottom of the Field List),
as shown in Illustration 10.
Illustration 10: The PivotTable Field List with our
Selection
- Click the Add to button.
We see the Region field appear in the Filter Area
of the PivotTable (the upper left hand corner).
- In the Field List, click City to highlight
it.
- Select Column Area in the selector box, to the
right of the Add to button.
- Click the Add to button.
- In the Field List, click Company Name to
highlight it.
- Select Column Area, again, in the selector box, to
the right of the Add to button.
- Click the Add to button.
This adds the Company Name field to the right of the City
field in the column area of the PivotTable.
- In the Field List, click Order Date to
highlight it.
- Select Row Area in the selector box, to the right
of the Add to button.
- Click the Add to button.
- In the Field List, click Order ID to
highlight it.
- Select Detail Data in the selector box, to the
right of the Add to button.
- Click the Add to button.
- Repeat steps 14 through 16 for the following
fields, in the order shown:
-
Product Name
-
Quantity
-
Unit Price
-
Discount.
A small sample of the PivotTable view is partially shown in Illustration
11.
Illustration 11: The PivotTable with Our Field Assignments
(Sample View)
- Close the Field List, as desired.
Now let's make our PivotTable more useful by adding
calculated detail fields and totals.