Running Sum

K

kevin0862

I know that this has been answered over a thousand times, but I've bee
working on this project and for the past 5 days I am unable t
calculate a running daily sum. Can someone assist me please?

Confused :confused:

Associate Name | Date | Daily Production | RunTot
Jane Doe | 1/3/05 | 100 |
100
Jane Doe | 1/4/05 | 175 |
275
Jane Doe | 1/5/05 | 75 |
350


My expression has been written as:

RunTot: (SELECT Sum([Daily Production]) From [Associate Dail
Production] A WHERE A.[Date Completed]<=[Associate Dail
Production].[Date Completed]
 
M

Marshall Barton

kevin0862 said:
I know that this has been answered over a thousand times, but I've been
working on this project and for the past 5 days I am unable to
calculate a running daily sum. Can someone assist me please?

Confused :confused:

Associate Name | Date | Daily Production | RunTot
Jane Doe | 1/3/05 | 100 |
100
Jane Doe | 1/4/05 | 175 |
275
Jane Doe | 1/5/05 | 75 |
350


My expression has been written as:

RunTot: (SELECT Sum([Daily Production]) From [Associate Daily
Production] A WHERE A.[Date Completed]<=[Associate Daily
Production].[Date Completed])


I think that calculated field needs that table alias in the
Sum so the sum can figure out which instance of the table it
is operating on.

RunTot: (SELECT Sum(A.[Daily Production]) From [Associate
Daily Production] A WHERE A.[Date Completed]<=[Associate
Daily Production].[Date Completed])
 
Top