If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combining Data for a Quarterly Report
I've not been able to work on this for a month and I appreciate the responses
I've received but am still a bit confused. So, I'll try again with some examples and hopefully a little better explanation. Listed below is the format and the headings that I need to use. MONTH USAGE Previous 11 MONTHS USAGE April 2009 10 132.619 (= to 5/1/2008 to 3/31/2009) May 2009 12.417 127.504 (= to 6/1/2008 to 4/31/2009) June 2009 9.872 131.72 (= to 7/1/2008 to 5/31/2009). Even though this says April through June it could be Jan to March, etc. of any given year based upon a date range. My query will list the "Usage" totals by month, but I don't know how to add the previous 11 to each months listed. Also, if basic is used I'm not sure how to incorporate it. Please feel free to ask for clarification on any part of this example. I appreciate your time and patience in answering this. |
#2
|
|||
|
|||
Combining Data for a Quarterly Report
I expect you could use a subquery in your report's record source to get the
previous 11 months. The subquery might look like: Prev11: (SELECT Sum(USAGE) FROM tblYourtable A WHERE A.[Month] BETWEEN DateAdd("m",-11,tblYourTable.[MONTH] AND tblYourTable.[Month]) -- Duane Hookom Microsoft Access MVP "Tsidjpt" wrote: I've not been able to work on this for a month and I appreciate the responses I've received but am still a bit confused. So, I'll try again with some examples and hopefully a little better explanation. Listed below is the format and the headings that I need to use. MONTH USAGE Previous 11 MONTHS USAGE April 2009 10 132.619 (= to 5/1/2008 to 3/31/2009) May 2009 12.417 127.504 (= to 6/1/2008 to 4/31/2009) June 2009 9.872 131.72 (= to 7/1/2008 to 5/31/2009). Even though this says April through June it could be Jan to March, etc. of any given year based upon a date range. My query will list the "Usage" totals by month, but I don't know how to add the previous 11 to each months listed. Also, if basic is used I'm not sure how to incorporate it. Please feel free to ask for clarification on any part of this example. I appreciate your time and patience in answering this. |
Thread Tools | |
Display Modes | |
|
|