Link to home
Create AccountLog in
Avatar of aroh9barve
aroh9barve

asked on

rolling sum in access

field 1           field 2            running sum
1                   1                   1
1                   2                   3
1                   3                   6
1                   4                   10
2                   1                   1
2                   2                   3
2                   3                   6
2                   4                   10
Avatar of als315
als315
Flag of Russian Federation image

ASKER CERTIFIED SOLUTION
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of aroh9barve
aroh9barve

ASKER

Thanks

I have tried doing this but it takes too long as my query contains around 10000 records

Can u give me a way which can do this really fast
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Good call Jeff...
Mark,

It seems as thought the asker wants SQL in this case.

But in some cases the asker will opt to use a report, because they may not know it is possible.

This is why I always post it as an alternative.

(besides, SQL is not one of my strong points...)
;-)

Jeff
The problem with storing this in the table is that as soon as a record changes, the column needs to be recalculated. Plus, if the sum is for groups, different groups will need different columns.

It belongs on the display/report side of things. The running sum in reports works great. It even works in report view if people filter the data.

We've dealt with analysis like this in our statistics programs but only for things that are more complicated like moving averages or cumulative ranks where ties are involved. That said, I still don't think it should be stored in the "master" table.
Deleted ?

There is some good information in this thread. There is also code that does work. The volume of data and the subsequent suggestions about indexes and storing inside the table are, well, subsequent without the Asker responding.

Suggest a split at least.

Suggest that we keep in PAQ.
How about even split :

http:#a34427145
http:#a34427989
http:#a34429139
http:#a34437192

not sure about Luke's post and als315 post. Good information, but not quite as "direct" in terms of involvement in a solution. Thoughts ?
FWIW,

I'm cool with the split...
Starting auto-close process to implement the recommendations of the participating Expert(s).
 
modus_operandi
EE Admin