Microsoft KB Archive/103270

{|
 * width="100%"|

ACC1x: Graphing Current Sales Compared with Accumulated Sales

 * }

Q103270

-

The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

-

SUMMARY
This article describes how to create a graph that displays each customer's total sales for all years compared with their sales for 1992. The data in the graph is also broken out according to the company from which the orders were shipped.

This example uses tables in the sample database NWIND.MDB.

How to Create the Queries
  Create the following new query based on the Orders table, and then save the query as Total Sales:

     Field:  Customer ID   Ship Via   Order Amount Total: Group By      Group By   Sum   Create the following new query based on the Orders table, and then save this query as 1992 Sales:

     Field:    Customer ID   Ship Via   Order Amount   Order Date Total:   Group By      Group By   Sum            Where Criteria:                                        >=#1/1/92#  Create a new query based on the Total Sales and 1992 Sales queries. Join on the field [Customer ID]. Double-click the join line and select the option Include ALL Records From Total Sales. Join on the field [Ship Via]. Double-click the join line and select the option Include ALL Records From Total Sales.  Drag [Customer ID], [Ship Via], and [SumofOrder Amount] from Total Sales to the query grid. Add the label Total: to [Sum of Order Amount] as follows:

     Total: [SumofOrder Amount]   Drag [SumofOrder Amount] from 1992 Sales and add the label 1992 as follows:

<pre class="FIXEDTEXT">     1992: [SumofOrder Amount] </li> Run the query to verify that it works correctly and then save it as Sales Summary.</li></ol>

How to Create the Graph
<ol> Create a new, blank report based on the Customers table. Display the field list and drag the Customer ID field to the detail section.</li> Create a new graph in the detail section by selecting the Graph tool from the Toolbox and drawing an unbound object frame.</li> Make the following selections in the Graphing Wizard:

<ol style="list-style-type: lower-alpha;"> Data source: Sales Summary

Totals: Sum</li> Which field(s) for data and labels: Ship Via, Total, and 1992</li> What labels do you want: Ship Via</li> What labels for the legend: Total and 1992</li> Link the Graph to the Report: Yes</li> Which fields will link: Customer ID = Customer ID</li></ol> </li> Save the report and then preview it. For each customer, the report should display a graph of that customer's total sales and 1992 sales organized by the shipping company.</li></ol>

Additional query words: overlay multiple summary

Keywords : kbtool

Issue type : kbinfo

Technology :