Results 1 to 2 of 2
  1. #1
    B20Pete is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2009
    Posts
    1

    How do I group & average at the same time?

    Here is what I have so far:



    Supplier Code *next column* Avg of Cost

    05 *next column* $8.05

    05 *next column* $11.35

    05 *next column* $14.25

    05 *next column* $14.80

    13 *next column* $14.35

    13 *next column* $67.10

    13 *next column* $82.10

    21 *next column* $36.10

    21 *next column* $39.80

    21 *next column* $43.50


    I would like it to look like the following:

    Supplier Code *next column* Avg of Cost
    05 *next column* Avg of all 05
    13 *next column* Avg of all 13
    21 *next column* Avg of all 21

    Somehow, I need to group all the supplier codes into one row, then I need to average the cost for each supplier code.

    I am doing this in design view.

    Thank you,

    Pete

  2. #2
    pdouglas is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    Jun 2009
    Posts
    12
    In Design View, Go to View (on the menu) and select "Totals".
    You should get another row "Total".
    For the field you want to group together, make sure the "Total" row in the Grid says "Group By" and the Sort has "Ascending" (or Descending if you want).
    For the field you want to get the average, have the "Total" row in the grid say "Avg" (or whatever Access 2007 calls averaging).
    This will have
    Code Avg
    01 5.5
    07 8.8
    13 1.3
    dot
    dot
    dot

    Tweak #1 - You can also select to have the total row be Sum.
    Tweak #2 - Have the sort on Avg (or Sum, or Other field) Descending and not on the Code. This will show the highest average at top. If you did on Sum and Descending, it would show your highest seller / customer / whatever at the top.

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

Similar Threads

  1. Rounding the Average in a Query
    By jakelufkin in forum Access
    Replies: 3
    Last Post: 06-19-2009, 08:31 PM
  2. Conditioned Average
    By BravoEcho in forum Queries
    Replies: 1
    Last Post: 06-17-2009, 09:38 PM
  3. 7 day average and total
    By jannie in forum Access
    Replies: 1
    Last Post: 05-14-2009, 05:52 PM
  4. Newbie Needs help with combine/average
    By wfd1753 in forum Queries
    Replies: 2
    Last Post: 05-16-2008, 06:43 AM
  5. Weighted Average - Challenges
    By edmund_xue in forum Access
    Replies: 0
    Last Post: 04-02-2008, 12:54 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