How to sum rows and columns in Access.
I have a data base with lots of rows and columns. In some cases I would like to sum either the row or column and use the
total in another query to either work out each row/column as a % of the total of use the total elsewhere. How would I go
about doing this.
Product 1 Product 2 Product 3 Total
12 15 17 44
% of product 1= 12/44 =
So what I did is to from this information write a query to say:
Total : [Product 1] + [Product 2] + [Product 3]
Then I wrote another query to say:
% of product 1 : [product 1] / [total]
% of product 2 : [product 2] / [total]
% of product 3 : [product 3] / [total]
But this becomes unfeasible sine I have 150 products.
can assist me with this.
With columns it is a little easier since I can use the Group By; sum function. I did it
Volume of Product 1
Customer 1 50
Customer 2 40
Customer 3 30
Customer 4 40
The query I wrote just said that volume of product 1, and then I choose the “Group by”
function, “sum” and store it as total volume.
So the % I did in another query:
% Customer 1 : [customer 1] / [total volume]
% Customer 2 : [customer 2] / [total volume]
% Customer 3 : [customer 3] / [total volume]
% Customer 4 : [customer 4] / [total volume]
But this becomes unfeasible sine I have 33000 customers.
Kindly assist in this.