Results 1 to 4 of 4
  1. #1
    baba is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    43

    Can we show two column names from a query in X axis barchart

    Select Year,Type,Count(*) from Table group by Year,Type;
    I am running the above query to create a bargraph:

    Result of my query:
    Year Type Count
    ---- ----- ------
    OCt-10 Type1 5
    Apr-11 Type 4 4


    Expected graph:

    Y axis Counts
    X axis Year and then Type together

    Two bars in total :
    One bar for Oct-2010,Type 1 showing a count of 5
    One bar for Apr-2011,Type 4 showing a count of 4
    Is it possibe to show Year as well as the Type values as labels in X axis in a barchart. Please let me know.


    I know it can be done with pivot charts but I dont know how to create it as a report with pivot barchart .

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    In my experience, X axis can be only one field. You could concatenate the two fields and use that as the X axis. How will that affect plotting your data?
    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
    baba is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    43
    Result of my query:
    Year Type Count
    ---- ----- ------
    Oct-10 Type1 5
    OCt-10 Type 2 7
    Apr-11 Type 4 4
    Apr-11 Type 5 8
    Apr-11 Type 9 1


    Oct -10 should have 2 bars .X axis main heading Oct-10 and sub heading should be Type 1 below bar 1 and Type 2 under Bar 2 .
    Similarly for Apr-11,there should be 3 bars. Hope I explained my expected results properly. Thanks for the help!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Doesn't add any new info and doesn't alter my earlier comment. You could try my suggestion and see if it is adequate.
    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. Query Entity Names, and Column Names
    By Accidental DBA in forum Queries
    Replies: 1
    Last Post: 07-22-2011, 02:38 PM
  2. Replies: 5
    Last Post: 04-24-2011, 03:14 AM
  3. Replies: 2
    Last Post: 04-29-2010, 11:06 PM
  4. Query to get column names in a table
    By access in forum Queries
    Replies: 1
    Last Post: 07-06-2009, 05:10 AM
  5. Query to get column names in a table
    By access in forum Forms
    Replies: 1
    Last Post: 07-01-2009, 02:50 PM

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