Accumulated values in query

Firasath

Board Regular
Joined
Feb 20, 2011
Messages
137
Office Version
  1. 365
Hi, I have a question regarding Access Query. My Query results looks like the below one.

Code:
ClosedSlab	Consumer	Consumer-Gold	Enterprise	Prestige	SMB
1	30158	20014	4058	7817	4523
2	5240	3582	588	736	640
3	2141	1507	182	195	220
4	1054	664	98	187	118
5	498	253	55	108	55
6	261	147	28	61	31
7	141	85	27	35	22
8	82	40	14	17	10
9	37	15	5	8	4
10	17	11	3	3	5
11	12	2	1	2	
12	6	2		2	2
13	2	1			
	39649	26323	5059	9171	5630

My requirement is to accumulate the values in each column.

Secondly, I would like show the result in accumulated percentages too.

How can I achieve this in Access. Sorry, I could not above align the query results to the column.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I have a 'report' table.
step 1, I sum values and write to the tMoRpt table in the [sum] column (like you see above)
step 2, I calc the percentages and write to the table but in the [pct] column.
step 3, once I write all values, (many stages/depts) it sum this report table to the FINAL table tMoRptFinal
so now every dept has a single record
dept , sum, pct
ACCTG 2151 .75
IT 848 , .47

Then send reports on this final table.
 
Upvote 0
Sorry, didn't get. Are you running separate query to write or using the same query. Please elaborate a little.

The above result pasted is based on the cross tab query where I am checking how many complaints are closed within days specified in the first column. I want to accumulate that. It is very simple in Excel but not able to understand how to implement the same in Access.
 
Upvote 0
Ways to do totals in queries:

1. Do a Totals (Aggregate) Query. The resulting query will just be a single row.
See: Access Tips: Calculating Totals in Queries

2. Add a Totals Row to an Existing Query (may not be available in really old versions of Access).
See: Access 2010: Add a “Total” Row To Apply Mathematical Functions Quickly

Thanks for sharing the links. That is what I did and the above result is the output of it. My requirement is something like illustrated below.

DayNo. of (Day Wise)No of Complaints (Accumulative)
11010
22030
31545
5550
61060
7565
82085
930115
1020135
Total135

<tbody>
</tbody>

Is it possible with the Access Query? This is option is there in Excel, but could not figure out how to achieve it in Access.
 
Upvote 0
So, you actually are looking for a running sum? Not quite as easy in Access as in Excel, as the order/location of records in Access really has no meaning (like it does in Excel).

Here is a link that shows you how you can do that: https://support.microsoft.com/en-us/kb/290136
 
Upvote 0
So, you actually are looking for a running sum? Not quite as easy in Access as in Excel, as the order/location of records in Access really has no meaning (like it does in Excel).

Here is a link that shows you how you can do that: https://support.microsoft.com/en-us/kb/290136

Thanks. I was just looking for confirmation. I'll try to manage it in some other way then.
 
Upvote 0
Thanks. I was just looking for confirmation. I'll try to manage it in some other way then.
Note it CAN be done, and that link I provided shows you how. It just isn't as simple or straightforward as one might think.

Where people often get in to trouble is thinking that Access is an extension of Excel -- it is not, it is an entirely different program and needs to be thought of differently. Excel is a spreadsheet program, where Access is a Relational Database. The nature of those beasts is very different and serve different purposes.
 
Upvote 0

Forum statistics

Threads
1,221,842
Messages
6,162,333
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top