Running Sum of each Detail Record how?

R

Rog

What I am trying to do is keep a running talley of each
detail record. How can I do this?

Here is an example of what I am trying to do...

Date1
Name1 Goal Actual Name3 Running sum (Actual - Goal)
Name2 Goal Actual Name2 Running sum (Actual - Goal)
Name3 Goal Actual Name3 Running sum (Actual - Goal)
Name4 Goal Actual Name4 Running sum (Actual - Goal)

Date2 This sum carries over from
above for each name....
Name1 Goal Actual Name3 Running sum (Actual - Goal)
Name2 Goal Actual Name2 Running sum (Actual - Goal)
Name3 Goal Actual Name3 Running sum (Actual - Goal)
Name4 Goal Actual Name4 Running sum (Actual - Goal)

etc...
 
A

Allen Browne

You're after a progressive total difference for each name in a report
grouped by dates.

It might be easiest to do this by adding a calculated field to the query the
report is based on. Something like this:

RunningDiff: ( SELECT Sum([Actual] - [Goal]) FROM MyTable As Dupe
WHERE (Dupe.Name = MyTable.Name) AND (Dupe.Date <= MyTable.Date) )
 

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