Article ID: 132142 - Last Review: November 6, 2000 - Revision: 1.0 ACC2: How to Determine a Percentage from a Column of ValuesThis article was previously published under Q132142 On This PageSUMMARY
This article demonstrates how you can create three totals queries to
calculate a percentage for each unique record in a column of information,
and then shows you the results of running the queries. This example uses
the Orders table from the sample database NWIND.MDB to determine the
percentage of times an individual shipper was used for delivering invoice
orders.
MORE INFORMATION
To calculate a percentage for each unique record in a column of
information, follow these steps.
CAUTION: Following the steps in this example will modify the sample database NWIND.MDB. Before testing the following example, you may want to back up the NWIND.MDB file, or perform these steps on a copy of the NWIND database.
Running the QueriesBecause there is no join between the two queries used in the third query, the third query creates a Cartesian product between the ShipperCounts and ShipperTotalCount queries. But, because the ShipperTotalCount query has only one value, the result query has only as many records as the ShipperCounts query, and the expression is evaluated for each record to obtain the desired results.When you run the ShipperPercentage query, the following results are produced:
Ship Via Company Name ShipperPercent
--------------------------------------------
1 Speedy Express 29.68%
2 United Package 39.42%
3 Federal Shipping 30.89%
REFERENCES
Microsoft Access "User's Guide," version 2.0, Chapter 11, "Designing
Select Queries," page 246
For more information about expressions in queries, search for "expressions: in queries/filters," and then "Expressions in Queries and Filters" using the Microsoft Access Help menu. | Article Translations
|

Back to the top
