Full Version: Combining duplicates and adding Sums
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
jli83
Hello everyone,

I am a beginner at access so please forgive me if this question has been asked before. I have one table where I have the fields:
BDM
REgion
Sold?
Sold Revenue

I want to combine the duplicates from the BDM field and show the total sold revenue. What is the best way to do that?

Thanks in advance!
kbrewster
I would use a totals query...group on the BDM column and sum the [Sold Revenue] column.
jli83
Hi Kristen,

I tried that but it brings duplicate names in the BDM field. I want to combine those names and have a total of their revenue from the sold revenue field.

Jeff

Thanks for the quick response!
kbrewster
I guess I don't understand what you mean when you say...

QUOTE
I want to combine those names...
fkegley
You need to be careful. A totals query will give you one row for each different combination of Group By values it finds in its recordset.

To Group By on BDM field all by itself it must be the only field with Group By in its Totals cell.

If you need other fields then develop a new query that joins the totals query back to the table on the BDM field.
jli83
Thanks Frank and Kristen. Got it!
fkegley
You're welcome. Kristen and I are glad we could help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.