Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Year over Year Comparisons

Status
Not open for further replies.

jhb1

MIS
Dec 26, 2002
1
US
I am trying to either create a query or report where I can compare 2001 data to 2002 data. Both are currently in a single table with the following fields:

Year
Month
Total_Sales
Custom_Sales
Semi_Sales
Stock_Sales

Is there a way to run a query that will result in a side-by-side comparison, i.e., 2001 vs 2002 for each of the variables by month?

Thanks for your help.
 
One way is to create several queries:
1) 2001 query (query on Year=2001)
2) 2002 query (query on Year=2002)
3) Comparison query (join the first two queries together, linked by the Month field)

Note that if the 2002 data is incomplete (ie: missing December) be sure to set the join type to include all of 2001 and just those records from 2002 where they match.

-Larry
 
Another option could be a crosstab query with the years as the colume headers.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top