calculating a sum in a query

  • Thread starter Thread starter Paras Shah
  • Start date Start date
P

Paras Shah

Need some help to calculate a sum in a query for a group of records. Please
see an example of 5 different rows in my query:

Project No. Industry Value
12 Software 6
12 Software 7
12 Software 8
16 Hardware 4
16 Hardware 8

So, what I want is to sum all the "values" for a given "Project No" -
essentially I want the resulting query to look like

Project No. Industry Summed Value
12 Software 21
16 Hardware 12

And then I need to run other calculations on "Summed Value"

Any help in getting to a "Summed Value" field/ expression is most
appreciated.

-Paras
 
Paras,

Make a query in design view, based on your table and including the 3
fields shown in your example. Make it into a Totals Query (select
Totals from the View menu). In the Totals row of the query design grid,
leave Group By in the first 2 columns, and enter Sum in the Value
column. Run the query.

By the way, just a hint for next time... If you really think your
message is relevant to more than one newsgroup, please crosspost
(address the one instance of your message simultaneously to both groups)
instead of multi-posting (send separate copies of the message to each
group). Thanks.
 
Back
Top