Results 1 to 5 of 5
  1. #1
    taholmes160 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Location
    Lester, Ohio
    Posts
    67

    How do I calculate percentages of each of 10 responses in a query

    HI FOlks:



    I have a table with 124 responses to a survey. One of the survey questions is How satisfied were you with the staff at the event. ( scale of 1 - 10)

    So I have 124 responses with integer values between 1 and 10

    that is the only column in the table under consideration in this query -- I can make it tell me what the possible values for the answers are, and how many of each, what I would like to put in a report is the %of total that each response got

    Ive been digging around and have gotten a lot of random responses, but nothing that I can point to as the solution

    Can someone please point me in the right direction.

    Thanks
    ITM

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make Q1 to count the totals of each value: select [Answer], Count(Answer) as AnsCt from table

    make Q2 to count grand total: select Count(answer) as GrandTotal from table

    make Q3 to get percent: select Q1.Answer , (Q1.AnsCt / Q2.GrandTotal ) as Pct from Q1, Q2

  3. #3
    taholmes160 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Location
    Lester, Ohio
    Posts
    67
    I have the Grand total working, im having issues with the query to count the totals

    SELECT [Form Responses 1].SatStaffCOUNT [Form Responses 1].SatStaff
    FROM [Form Responses 1]
    AS AnsCT;

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You need spaces between the words?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Need a space in front of COUNT and parens: COUNT(*). And probably need GROUP BY clause.

    [Form Responses 1] is a table or query name? Strongly advise not to use spaces in naming convention.

    You want to calculate percentage for each scale (1 - 10) value?

    If you are building a report, can possibly do Count() and percentage calcs in textboxes without aggregate queries.

    Example calc for 1 of 10 textboxes in report header or footer section: =Count(IIf([HowSatisfied]=1,1,Null))/Count(*)*100

    If you need more help, provide sample data either as a table in post or attaching db file.
    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. Calculate percentages in query
    By delmaruser in forum Queries
    Replies: 3
    Last Post: 10-11-2017, 03:19 PM
  2. How do I query and add percentages?
    By lccrews in forum Queries
    Replies: 3
    Last Post: 08-21-2017, 02:22 PM
  3. Calculate percentages within a query
    By AccessNovice16 in forum Queries
    Replies: 2
    Last Post: 09-28-2016, 12:21 PM
  4. Replies: 7
    Last Post: 05-06-2012, 12:20 PM
  5. Replies: 1
    Last Post: 03-04-2012, 11:22 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