From your post, I take it your data looks roughly like:
SaleDate SaleAmt
01Apr2008 $15
02Apr2008 $20
...
01May2008 $10
...
If I'm on the right track, here's a sketch of one way you could tackle this:
1. If you want totals by week, you can get that using a computed column and some summarization in the Filter and Query. Using the above data, here's what I'd do. Create a computed column -- say, Week_Number -- with Build Expression. Expression should look something like
week(aprsales.SaleDate ). The WEEK function is new to SAS 9, so you won't see it in the list of EG functions but you can still type it into the expression (assuming you're running SAS 9). More documentation on the function is here:
http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a003154994.htm
To be on the safe side, create a second new column from an expression -- Year -- like
year(aprsales.SaleDate ).
2. Once you have the computed columns Week_Number and Year, then get Week_Number, Year, and SaleAmt in the Select Data. Change Summarization on SaleAmt to SUM. In Summary Groups below the Select Data, click Edit Summary Groups and move Year and Week_Number into the Group By.
When you run the task, that should give you totals by year and week for all your data. To get the rolling 52 week behavior, that would be some sort of filter based on dates. Scott's code could be a useful technique here, along with something like a TODAY function in the filter to automate getting the appropriate 52-week window.
Best,
Richard