Results 1 to 2 of 2
  1. #1
    oakhoplite is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2018
    Posts
    9

    Question Calculating the sum of specific fields where the ID= the same value.


    Hi! I am quite new to Access and I am trying to create a query that calculates the sum of some fields for which the ID=the same value. For example, if I have a table that contains the scores obtained by skaters for each move that has appeared in their performance.
    SkaterID MoveID Score (for that move)
    1 4 11
    1 5 12
    2 8 9
    2 9 8

    And I want a query that displays the SkaterID and the TotalScore for their performance (the total score is equal to the sum of the scores - for that skater). So the sum of the scores for which the SkaterID is the same so that I get a datasheet that looks like this:
    SkaterID TotalScore
    1 23
    2 17

    I am sorry if the explanation was very unclear! Help would be greatly appreaciated!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,991
    You need to create an aggregate query.
    In query design view, add the 2 fields SkaterID and Score.
    In the ribbon click the Totals button -Greek letter Sigma
    An extra totals row appears in your query with both fields showing Group By.
    Change that to Sum for the Score field.
    Run the query and it should look similar to what you want except it will say SumOfScore.
    If you want TotalScore change the Score field to TotalScore:Score in the field Name row
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 1
    Last Post: 02-23-2016, 08:36 PM
  2. Replies: 1
    Last Post: 04-29-2014, 12:20 AM
  3. Calculating subform fields
    By Tvanduzee in forum Forms
    Replies: 25
    Last Post: 09-17-2012, 06:42 AM
  4. Calculating age during a specific time frame
    By mommaof4kids in forum Reports
    Replies: 1
    Last Post: 09-06-2012, 06:08 PM
  5. Replies: 0
    Last Post: 03-09-2012, 07:04 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