• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 34. Using Queries > Calculating Totals in a Query

Calculating Totals in a Query

When some of the data in the query datasheet is numeric, you might want to tally the information in some way. You can easily sum and average the numbers in a query datasheet or determine the minimum and maximum values.

To calculate totals:

1.
On the Queries tab of the Database window, select a query and click the Design button.

or

If the query is open, click the Design View button.

2.
Click the Totals button (Figure 34.19).

Figure 34.19. Click the Totals button on the toolbar.


or

From the View menu, choose Totals.

A Total row appears in the query design grid.

3.
To group the data by the entries in a particular field, choose Group By from the drop-down list in the Total cell for that field.

4.
Select an option from the drop-down list in each Total cell of each field in the query window design grid (Figure 34.20).

Figure 34.20. Select a method from the Totals drop-down list.


5.
Run the query (Figure 34.21).

Figure 34.21. The query results.


6.
Save the query.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint