Sums by Date Range(s)

  • Thread starter Thread starter KLGarner
  • Start date Start date
K

KLGarner

I have several fields that I need to sum by type and week for multiple weeks
(more than a year-nearer to 2). This is an attempt to take a VAST amount of
daily information and total into weekly (primarily, and monthly in another
query) values for the purpose of forecasting.

If anyone can assist me with this, I would very much appreciate it!
 
you will need something like

SELECT Format([date field],"w") AS theweekofyear, Format([date
field],"yyyy") AS theyear, sum([field1 to sum]) as [sum of field1],
sum([field2 to sum]) as [sum of field2] etc...
FROM yourtable
GROUP BY Format([date field],"w"), Format([date field],"yyyy");

if you want to do it from the gui interface you need to right click on
the fields area click totals

and then have the fields

theweekofyear: Format([date field],"w")
theyear: Format([date field],"yyyy")
sum of field1: sum([field1])
sum of field2: sum([field2])
etc ...
hope this helps

Regards
Kelvan
 
Back
Top