Results 1 to 5 of 5
  1. #1
    lvh519 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Location
    Houston
    Posts
    4

    Compare data across years

    I have a very simple database of product sales. My fields are Location, Product, Customer, Date, Qty. I want to be able compare January detail this year to January detail last year. I have an extra field titled monthnumber that extracts the numeric value of the month and that is what I am sorted/grouped under. I set up parameters to filter down to the years I want to compare. My report looks great, the problem is I can't do any calcuations on the data other than add them together. Is there a better way to get this information? I am not sure how to post my data here, so any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You want to get the two years side-by-side so you can calculate a change?

    One approach might be to do two queries, one for each year, then join those queries to serve as RecordSource for report.

    Attachment Manager is below the Advanced post editor.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    lvh519 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Location
    Houston
    Posts
    4
    Quote Originally Posted by June7 View Post
    You want to get the two years side-by-side so you can calculate a change?

    One approach might be to do two queries, one for each year, then join those queries to serve as RecordSource for report.

    Attachment Manager is below the Advanced post editor.

    I have my two queries created. How do I join them? It has been YEEEAARRS since I have had to deal in VBA/SQL coding.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Are these aggregate queries that group on the month? Do both queries have every month? If both yes, join one to the other on the month fields.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    lvh519 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Location
    Houston
    Posts
    4
    Quote Originally Posted by June7 View Post
    Are these aggregate queries that group on the month? Do both queries have every month? If both yes, join one to the other on the month fields.

    Got it. Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 01-25-2012, 09:46 AM
  2. Replies: 14
    Last Post: 01-12-2012, 05:03 PM
  3. Compare Data in Multiple Tables
    By Access_newbie in forum Queries
    Replies: 7
    Last Post: 07-26-2011, 11:35 AM
  4. Compare msaccess data
    By dref in forum Queries
    Replies: 10
    Last Post: 05-14-2010, 05:35 AM
  5. Using IIF to compare two fields data
    By psych in forum Access
    Replies: 2
    Last Post: 03-10-2010, 10:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums