Results 1 to 5 of 5
  1. #1
    shindb81 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    10

    Chart for annual comparison of data by months

    Hi.
    I have a small clinic database.
    I've got tblAppointments to show AppointmentID and AppointmentDate among various other data, but only the dates matter for what I'm trying to achieve.

    I'm trying to show a chart on a report that shows the number of appointments by months for this year and previous year. How can I do this...without using SQL, hopefully?

    Here's what I tried:


    I made a cross-tab query to successfully show the years 2013 and 2014 in the rows, months in the columns, and number of appointments as values. But then, I didn't know how to graph it to compare the number of appointments for the two years by months.

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try setting that query as the RowSource of a graph object.

    I did a quick test for a bar chart and the years became the x-axis, the months the series, and the count was the y-axis.
    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
    shindb81 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    10
    Thanks for looking into this.
    Yes, what you've said will produce a kind of graph that is accurate to description. But I was hoping to compare each month of the two years side to side.
    The attached is the graph I want, which I was able to create with a click of a button in Excel.
    If exporting the query data automatically to excel and also graphing it automatically is possible with some VBA code, I'd like to know how to do that.


    Click image for larger version. 

Name:	Cap 2014-05-20 23-55-11-888.png 
Views:	9 
Size:	5.4 KB 
ID:	16506

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then change the CROSSTAB so the months are the row headers and years are the column headers.

    The months become the x-axis and the years are the series, count is still y-axis.

    I get exactly what you posted.
    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
    shindb81 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    10
    Wow, problem solved!
    Thanks a bunch.

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

Similar Threads

  1. Date Query: Annual Data Based off of Form Date
    By steveabni in forum Queries
    Replies: 4
    Last Post: 04-21-2014, 02:15 PM
  2. Replies: 3
    Last Post: 02-23-2014, 02:06 PM
  3. data comparison query help
    By aselm01 in forum Queries
    Replies: 10
    Last Post: 09-12-2013, 03:29 PM
  4. Using same data for different months
    By EthanMoist in forum Access
    Replies: 1
    Last Post: 05-24-2013, 02:37 AM
  5. Month wise two years data comparison
    By waqas in forum Reports
    Replies: 2
    Last Post: 07-06-2012, 08:35 AM

Tags for this Thread

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