running sum help

G

Guest

I am having a difficult time with a query in my database and could really use
a few ideas. I have a database that sums all pending maturities for a
portfolio. I have a crosstab query that sums all of the maturities by day-
which I then send to a table (via a make table query). I then query off of
this table. This is where my problem arises- I need to have a runnning sum by
day of maturing debt. Example:

Date Total of Amount Running Sum
6/01/06 4,000,000,000 4,000,000,000
6/02/06 50,000,000 4,050,000,000
6/03/06 50,000,000 4,100,000,000

I have been having trouble getting this to work. I have read that dsum is
not the way to go, and I am not experienced with writing SQL code. After I
complete this step, I have one other step to complete. I would like to
capture the sum of all maturing debt within the next year. I will use this
amount as my starting point and build on it: example:

Date Total of Amount Running Sum 1-YR
6/01/06 4,000,000,000 4,000,000,000 12,000,000,000
6/02/06 50,000,000 4,050,000,000 (12BN +
6/02/07)
6/03/06 50,000,000 4,100,000,000 (amount +
6/03/07)

If anyone has any ideas I would really appreciate it, as I have been stuck
on this one for a few days. Thanks
 
S

Svetlana

You could try make 1 more query for calculate the [Running Sum] and
[1-YR] specifying criteria based on dates in DSum() function as like
[Date]<= then use DLookup() function for recall them in your query.
 

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