How to create a rolling sum in a query

R

RSon

Hello....I need to create a rolling sum for a certain field. This is the
table and my output fied should be equal to rolling sum. I would need to
start a new rolling sum for each region. Is there a way to accomplish that
in one query?

Region Total Payout Rolling Sum
LA 5 5
LA 4 9
LA 4 13
LA 3 16
Southern 4 4
Southern 3 7
Southern 3 10

ANy help would be great! Thank you!!
 
R

RSon

Hello Ken,
I took a look at the example, however, I do not believe it will work. I do
not have a unique field like an emp Id or a ranking column. If I were to
create a ranking column then would that suggestion work? If so, how do I
create a ranking column and still seperate each region?
 
K

Ken Snell \(MVP\)

You will need to add a field to your query that is unique -- an autonumber
field will do this for you. Having a unique field is necessary to do what
you seek -- a rolling sum or a ranking.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top