Cumulative total

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:
I have a table and would like to get cumulative totals like the following
format
Date Result CumulativeTotal
Jan1 1 1
Jan2 0 1
Jan3 2 4
Jan4 3 7
....
Which function or expression I can use to get the CumulativeTotal?
Thanks in advance
 
You might use an expression (in the Field row in Query Design view) like
this:

CumulativeTotal: (SELECT
Sum([Result])
FROM
[Your Table] AS [Self]
WHERE
[Self].[Date] <= [Your Table].[Date])

This assumes your table is named "Your Table".
 
Thanks a lot for your help!!!


Brian Camire said:
You might use an expression (in the Field row in Query Design view) like
this:

CumulativeTotal: (SELECT
Sum([Result])
FROM
[Your Table] AS [Self]
WHERE
[Self].[Date] <= [Your Table].[Date])

This assumes your table is named "Your Table".

Vincdc said:
Hello:
I have a table and would like to get cumulative totals like the following
format
Date Result CumulativeTotal
Jan1 1 1
Jan2 0 1
Jan3 2 4
Jan4 3 7
...
Which function or expression I can use to get the CumulativeTotal?
Thanks in advance
 
Back
Top