Results 1 to 4 of 4
  1. #1
    chrismid259 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    6

    Require some assistance in creating a bar chart

    Hi all,
    The title might suggest that I am slightly dim in that I want to simply create a bar chart. In fact, I need to create a specific bar chart that incorporates quite a fair amount of data.

    For the purpose of this thread, I've exported the data from an Access table into Excel. The data that I have to create the bar chart includes; a customer ID number, Q1rating (through to Q9rating) and Date.

    The bar chart will need to be a clustered bar chart. Preferably, I'd like the X axis to have Year (ie 2010, 2011) and then above have Q1 with a bar that includes; Excellent, Very Good, Satisfactory, Poor and Very Poor. This should also display the count for each catagory and a total at the top of the bar - this would then go on for each question and year.

    I've attached the data to this thread. I'd appreciate it if someone could tell me how this can be done as I have no idea on how to create a bar chart that is this complex.



    Thank you in advance.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    First four 4 records lack data in the Q8, Q9, Date fields. Other records are missing Date. Should these be excluded from the chart?

    Numbers 1 through 5 represent the categories with 1 being Excellent?

    You want the ratings aggregated by date? For instance, May 2010, all the ratings are 1. That is a total of 9 Excellent and none for the other categories in that period. This probably won't be easy.
    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
    chrismid259 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    6
    Quote Originally Posted by June7 View Post
    First four 4 records lack data in the Q8, Q9, Date fields. Other records are missing Date. Should these be excluded from the chart?
    Yes, exclude these from the chart - for now.

    Quote Originally Posted by June7 View Post
    Numbers 1 through 5 represent the categories with 1 being Excellent?
    1 = Excellent, 2 = Good, 3 = Satisfactory, 4 = Poor, 5 = Very Poor[/quote]

    Quote Originally Posted by June7 View Post
    You want the ratings aggregated by date? For instance, May 2010, all the ratings are 1. That is a total of 9 Excellent and none for the other categories in that period. This probably won't be easy.
    Yes, but only by year, not by month. If that makes sense.

    I know it's not going to be easy at all. I have absolutely no idea where to start with this.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929

    Access Chart/Graph

    Here's what I did, actually not as hard as I expected, already being familiar with UNION query:

    1. Built UNION query to normalize the data. There is no designer or wizard for UNION, must type in the SQL View editor.

    InfoUNION
    SELECT [Date] As RecDate, "Q1" As Cat, Q1Rating As Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q2", Q2Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q3", Q3Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q4", Q4Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q5", Q5Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q6", Q6Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q7", Q7Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q8", Q8Rating FROM qryCustomerInformation
    UNION SELECT [Date], "Q9", Q9Rating FROM qryCustomerInformation;

    2. Built report and chart. I used the chart wizard to build simple bar chart. Don't worry about settings, just create the object.

    3. Edited the chart's RowSource SQL to:
    TRANSFORM Count(InfoUNION.Cat) AS CountOfCat
    SELECT Year([RecDate]) AS RecYear
    FROM InfoUNION
    WHERE ((Not (Year([RecDate])) Is Null) AND (Not (InfoUNION.Rating) Is Null))
    GROUP BY Year([RecDate])
    PIVOT InfoUNION.Rating;

    4. Edited the chart to select the stacked bar option. Format chart axis labels, titles, legend. This is not as easy as in Excel. Right click on chart > Chart Object > Edit (or Open), right click on the opened chart > Chart Options. Click Ok to close Options. Close the chart.

    5. Open report to preview and save and close. Open in design view and should see your settings instead of the generic stuff.

    The resulting chart has two stacks, one for each year, with 3 parts for ratings 1, 2, 3, none for 4 and 5.
    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.

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

Similar Threads

  1. Can queries require 4GB of ram?
    By chris@staples in forum Queries
    Replies: 3
    Last Post: 06-20-2011, 03:28 PM
  2. Replies: 2
    Last Post: 04-01-2011, 11:30 AM
  3. Replies: 2
    Last Post: 07-12-2010, 05:39 AM
  4. Creating a Pivot Chart....
    By spcalan in forum Access
    Replies: 0
    Last Post: 01-08-2009, 03:28 PM
  5. Creating a chart
    By Tim Wuckowitsch in forum Reports
    Replies: 0
    Last Post: 10-31-2006, 11:39 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