Results 1 to 8 of 8
  1. #1
    SDickson is offline Novice
    Windows 10 Access 2013
    Join Date
    Nov 2015
    Posts
    4

    Summing multiple columns

    Hi new to Access but would like to be able to sum fields from multiple columns in same table to make single value in field of another column


    from a table i created with 17 questions, allowing multiple numerical values per question, (ie answer to question 1 can be either 3, 6, 8 in value, the next question will have different multiple values to choose from 1,4, 7), the answers then used to apply to another 10 tables of various health measurement say Physical, mental, etc which a score is calculated ranging from 0-100 summing the various questions . Table Physical would use Question 1,8,9 mental would use Question 2,3,6,10,11,14 and so forth for the other Health measurement tables. Each of the health measurement data applies to individual clients final table will list clients and each of the calculated values for the 10 health measurements from there i would query populations of clients that show various high risk levels and so forth to see trends with the original 17 questions

    Tables using:


    Clients
    Questionaire (17 Questions )
    10 different Health profiles (Physical, mental, social, etc)
    Health Profile (is sum of various health profiles multiplied by a constant value to achieve final score
    Last edited by SDickson; 11-12-2015 at 12:20 PM. Reason: additional information

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    Are you trying to save the value in the table, or see the value?
    Usually you don't want to save the value in a table, but seeing the total in a query is easy
    Create a query and in a blank column so TotalCol: [field1]+[field2]+[field3]

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Sum all the columns you want, by clicking the Summation button in qry design.
    bring down the fields needed, and set to SUM.

    you can add you own 'constant' in an empty field put your constant or field not getting summed.

  4. #4
    SDickson is offline Novice
    Windows 10 Access 2013
    Join Date
    Nov 2015
    Posts
    4

    the give more information on why i want to sum different columns

    Quote Originally Posted by SDickson View Post
    Hi new to Access but would like to be able to sum fields from multiple columns in same table to make single value in field of another column
    from a table i created with 17 questions, allowing multiple numerical values per question, (ie answer to question 1 can be either 3, 6, 8 in value, the next question will have different multiple values to choose from 1,4, 7), the answers then used to apply to another 10 tables of various health measurement say Physical, mental, etc which a score is calculated ranging from 0-100 summing the various questions . Table Physical would use Question 1,8,9 mental would use Question 2,3,6,10,11,14 and so forth for the other Health measurement tables. Each of the health measurement data applies to individual clients final table will list clients and each of the calculated values for the 10 health measurements from there i would query populations of clients that show various high risk levels and so forth to see trends with the original 17 questions

    Tables using:
    Clients
    Questionaire (17 Questions )
    10 different Health profiles (Physical, mental, social, etc)
    Health Profile (is sum of various health profiles multiplied by a constant value to achieve final score

  5. #5
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    I assumed you were adding column within each record. Ranman is thinking you are totaling a column of values across all records. So use the method which works for your situation.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    A field for each question is not a normalized data structure and will likely cause you lots of headaches, one of which is this sum you want to do.

    Be aware that arithmetic with Null returns Null.
    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.

  7. #7
    SDickson is offline Novice
    Windows 10 Access 2013
    Join Date
    Nov 2015
    Posts
    4
    Col1 Col2 Col3 Col4 Col5 Col6 C0l7
    Physical = Col1 + Col4 + C0l7 times 10 = Value?
    ClientA Cloumn Scores 2 1 0 0 2 1 1
    Mental = Col2 + Col5 times 20=Value?


    This looks much what im trying to get at the value is a score 0 to 100 for each client, and for each health profile for each client

    I have Tables
    Clients
    Questionaire(my 17 questions with score)
    do i set up 10 more tables with each profile(Physical, Mental) and how do i add different columns to get value for individual profile for each client

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Questionnaire type database has been topic of numerous threads. Did you search?
    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. Summing Multiple Queries & Summing Time
    By WEJ in forum Queries
    Replies: 2
    Last Post: 10-04-2013, 04:46 PM
  2. Replies: 7
    Last Post: 01-02-2013, 11:23 PM
  3. problem with summing 2 columns
    By kwooten in forum Queries
    Replies: 1
    Last Post: 03-01-2012, 02:44 PM
  4. summing columns from two tables
    By scotty22 in forum Queries
    Replies: 3
    Last Post: 07-22-2011, 09:32 AM
  5. help with summing columns in a query
    By chrismja in forum Queries
    Replies: 0
    Last Post: 03-08-2011, 07:09 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