View Full Version : summing data


madrigale
08-25-2009, 11:49 AM
Hi, I have a table with 100k + records, all records have Locator Id and various fields. I am ok with having 1 Record ID with multiple records but I do need the sum of the data in fields per each record. I am more proficient in excel, where I would have used a sum if function under the Record ID Criteria, but I am not as comfortable in access. DB is too big to be transferred in excel
Example:
What I have:
Record ID/ Field 1 /Field 2
a/0/5
a/2/6
b/5/0
c/0/0
c/2/3

What I need:
Record ID/ Field 1 /Field 2
a/2/11
b/5/0
c/2/3

Can someone please help?

Scooterbug
08-25-2009, 11:53 AM
A simple Query with Totals turned on will work.

Make a new query. Add the RecordID, Field1 and Field2. Find the icon with the Greek letter on it. Hovering over it with the pointer it will say "Totals". Click that. You will see some new options appear for each field. For both Field1 and Field2, under the Total line, click the drop down and select Sum.

boblarson
08-25-2009, 11:54 AM
http://downloads.btabdevelopment.com/screenshots/welcometoawf.png

If you go into the QBE (Query By Example) grid and you add the three fields, then you click on this button http://downloads.btlarson.com/AWF/screenshots/sigma.png
and then under each field you select SUM instead of GROUP but leave GROUP for the ID field you should have it.

madrigale
08-26-2009, 10:08 AM
Thanks for replying!