Results 1 to 6 of 6
  1. #1
    Currancchs is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    11

    Pie Chart from Query

    I am trying to accomplish something I thought would be simple. All that I want to do is take a query composed of three Dcount expressions which result in three numbers and make it into a pie chart. Nothing that I do works however... The query is based on other queries which involve comparing lists for similar and dissimilar values. The query I am trying to base the chart on simply counts the number of records returned by the other queries. If anybody has any advice I would really appreciate it.



    Thanks!

  2. #2
    Kirsti is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172
    I take it you're trying to create the pie chart in a Report?

    I assume you're aware that a pie chart can only be based on two fields?

  3. #3
    Currancchs is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    11
    Quote Originally Posted by Kirsti View Post
    I take it you're trying to create the pie chart in a Report?

    I assume you're aware that a pie chart can only be based on two fields?
    Well, I feel a bit dumb for that one... So if I have three columns in a query with one number in each and I want these to become three areas in a pie chart, what would be the best way to go about that?

    Thanks.

  4. #4
    Kirsti is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172
    Well, you would need to requery, to change the way the data is presented. i.e. instead of:

    Field1 Field2 Field3
    Num1 Num2 Num3

    You would need:

    Field1 Num1
    Field2 Num2
    Field3 Num3

    If you manage to get your data into that format, you will be able to create a pie chart.

  5. #5
    Currancchs is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    11
    OK. Thanks for bearing with me!

  6. #6
    Ace is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    3
    Afternoon!

    I know this is an old thread but this thread is what pointed me in the right direction to resolve my issue with the chart so I figured I'd post my solution. The SQL below is how I converted my data into the second format.

    SELECT 'Iron and Carbs',ResultsMillipore.IronAndCarbPercent as Pc
    FROM ResultsMillipore
    WHERE [Forms]![Split Form - Millipore].[MilliporeID] = ResultsMillipore.MilliporeID;

    UNION ALL

    SELECT 'Inerts',ResultsMillipore.InertsPercent as Pc
    FROM ResultsMillipore
    WHERE [Forms]![Split Form - Millipore].[MilliporeID] = ResultsMillipore.MilliporeID

    UNION ALL

    SELECT 'Hydrocarbons',ResultsMillipore.HydrocarbonsPercen t as Pc
    FROM ResultsMillipore
    WHERE [Forms]![Split Form - Millipore].[MilliporeID] = ResultsMillipore.MilliporeID;

    This will adjust the data layout for the fields I need and compare the unique id for each record to make sure only the correct data is displayed on the chart.

    Thanks again for the pointers!

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

Similar Threads

  1. Make Chart From Query in Access 2007
    By James Parker in forum Access
    Replies: 6
    Last Post: 01-06-2012, 08:14 AM
  2. Multi Query Pivot Chart
    By Jaxxman in forum Queries
    Replies: 0
    Last Post: 11-18-2011, 03:44 PM
  3. Replies: 2
    Last Post: 07-12-2010, 05:39 AM
  4. Running Sum Problem in Query and Chart
    By sandyg in forum Access
    Replies: 0
    Last Post: 12-01-2009, 01:02 PM
  5. Query on chart not working properly!
    By Sim_ in forum Queries
    Replies: 0
    Last Post: 10-28-2009, 09:38 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