Very cool-- I did not know that, thank you.
With over 500,000 records, and needing to do 3 of these "cumes" in the same table (or recordset), I'm beginning to understand why calculated records shouldn't be stored (or created in the first place). This query hard on the cpu.
Yes, they are denormalized. This isn't a production database with dynamic data going in/out on a daily basis. It's more for reporting/analysis look at daily/weekly/monthly/quarterly/etc. snapshots in time.
I added in the aliases as you showed and it works like a charm. Thank you _so_ much.
If...
Duane-- here is the SQL:
SELECT [tblAYB].ITEM_NUMBER, [tblAYB].FISCAL_YEAR, [tblAYB].FISCAL_WEEK_NUMBER, (SELECT Sum([GGG_DEM]+[DO_DEM]) FROM [tblAYB] WHERE [tblAYB].ITEM_NUMBER = [tblAYB].[ITEM_NUMBER] AND [tblAYB].PERIOD <=[tblAYB].PERIOD) AS Cume, [tblAYB].FISCAL_YEAR...
This is in Access.
The point is that this is a very easy exercise in Excel, as Dallen pointed out. However, there is not, to my knowledge, an easy way to functionally or logically have Access check the prior row, on a unique "key"-- in this case, item number, or in Excel column A, and perform...
Is there a way to do a running sum as a calculated field? Forgive me if I sounded terse in my reply. There's more I want to do with this table (adding more fields, contingent on the cumulative value), and a report isn't what I'm after at this poin in time.
Definition really isn't important. You could call it supply and demand, or debit and credit. What's important is the two values are netted, and a running sum is added by date, for each unique item.
Appreciate you taking the time to look at this.
The formatting below isn't great, but hopefully not too difficult to extrapolate out the logic of what I'm trying to do.
Item Date Qty1 Qty2 Net Cume
Shoe 1/1/2009 5 2 7 7
Shoe 1/2/2009 -3 2 -1 6
Shoe 1/3/2009 0 0 0 6
Shoe...
Here's an example...
http://spreadsheets.google.com/ccc?key=0AoPAogi68vEUdGpmcmdrdk9Nb2dDaUozek9ScnpxY1E&hl=en
By item, I want the cumulative to represent, by date, the running sum.
Hey everybody, first time poster here.
Here's my situation. I have a table that basically looks like this...
Field Names:
Item
Date
Qty1
Qty2
Net
Cumulative
There is accurate data in all of the fields, except for cumulative. I have the data sorted ascending by Item, then ascending by date...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.