Summing Multiple Columns based on same customer names

bg18461

Registered User.
Local time
Today, 16:30
Joined
Dec 12, 2006
Messages
39
I have search around the forums and have only been able to find a partial answer to my problem.

I have a table with say 5 columns.
Column1=Business Name
Column2=DebitMonth1
Column3=DebitMonth2
Column4=DebitMonth3
Column5=DebitMonth4

Column1 will have different business names, but it will also have the same business name multiple times (business location is different).

I would like to sum up all the same business names in column 1 and columns2-5 together.

Example:
Column1 has these entrys:
Staples
Officemax
Staples
Staples

Column2-5
1 1 3 4 5
5 5 8 1 2
5 0 5 4 5
5 1 1 3 3

I would like all the Staples to be summed up across columns 2-5 so the math would be for Staples (1+1+3+4+5)+(5+0+5+4+5)+(5+1+1+3+3)=46 and for Officemax (5+5+8+1+2)=21

So the output of the query would be
Customer Name Sum(DebitMonth1-DebitMonth4)
Staples 46
Officemax 21

I hope thats clear, any ideas?
 
Any help, or should i just bring the raw data over into excel and process it there?
 
Create a new query and group by col 1 and sum col2-5

your sum column would be SubTot:Col1+Col2+Col3+Col4+Col5

David
 
I am not sure how to do the DCrake.

I selected Group By for column 1 (Cust Name)

I selected Sum in column 2-5

I am not sure how to setup the sum column...
 
nevermind i got it, had to first name column "Subtotal" and sum each column, example:
Field:Subtotal:[col2]+[col3]...+[col5]
Then select Group By

Thanks drake for pointing me in the right direction.
 

Users who are viewing this thread

Back
Top Bottom