Running Sum in Chart

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

Guest

I want to create a running sum in a chart to show the cumulative effect over
time.

For example
1990 10 10
1991 5 15
1992 3 18
....

I can see the running sum function in the report, but not in a chart. Any
suggestions?
 
You should be able to create these values in your chart's Row Source sql. I
think something like this might work for you:

SELECT YearFld, FieldA, (SELECT Sum(FieldA) FROM tblNoName nn WHERE
nn.YearFld <= tblNoName.YearFld) as FieldARunningSum
FROM tblNoName
ORDER BY YearFld;
 
Thanks. That just resolved an issue that I had been battling with for a long
time! I can now see how to apply that same method directly to queries as
well (which was the initial though, but just recently started using access
and was not used to scripting sql directly.

Thanks!
 
Back
Top