Results 1 to 5 of 5
  1. #1
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147

    Create percentage from column names

    I am trying to create a percentage of the (yeses and N/A) / (No's). There are 22 column names from another query.



    This is what I have tried in my query by I should be in the high 90% range instead of 4%.

    Yes: Sum([Doc2Y]+[Doc12-5Y]+[Doc25Y]+[Doc30y]+[Doc36y]+[MemoY]+[Doc19Y]+[Doc25-7Y]+[Doc26Y]+[Doc27Y]+[Doc32-2Y]+[SRSY]+[Doc44-2Y]+[ProjectsY]+[AbstractY]+[Doc34-9Y]+[Doc35Y]+[Doc37Y]+[ProtocolsY]+[Doc32Y]+[Doc49-2Y]+[Doc11-5Y])/("100")

    I have another one just like this but for the no's.

    Example: 20 yeses or N/A's of 22 column names subtracting 2 No column names should give me 91%.

    Is there a way that I can do this in a query that will show on my report?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    somebody who can post messages this fast, shouldn't need to ask about technology. You can probably google it faster than waiting for an answer, even from the fastest programmer on earth.

  3. #3
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    I spent over 2 hours googling and did not find the answer I was looking for. I always try that first before posting....

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    good for you.

    you may not get an answer either place, because the ? is not really that clear. what do you need exactly?

    It's probably my old age, as others are probably looking at this and thinking it's clear as a bell!

  5. #5
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    Think of it as an Excel spreadsheet that will calculate the percentage for you. This is much like that.

    When I use the sum() it does give me the total of all the yeses and N/A's for all the columns. I got it to add in by columns but now I need it to divide into a percentage.

    The field names are actually document numbers. It is a checklist that I have created and need to calcualte the percentage when sending it up the chain.

    I forgot to mention that it will also have to divide it by 10 records that I audit each month on top of what I already mentioned. Didn't think about it until I left for the day. (Brain fart)!

    The 91% would be from one Audit.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-29-2010, 11:06 PM
  2. create new column-name it from form field
    By hyperionfall in forum Forms
    Replies: 6
    Last Post: 03-04-2010, 01:53 PM
  3. create a query to find names not entered
    By tomClark in forum Queries
    Replies: 4
    Last Post: 02-24-2010, 10:58 AM
  4. Query to get column names in a table
    By access in forum Queries
    Replies: 1
    Last Post: 07-06-2009, 05:10 AM
  5. Query to get column names in a table
    By access in forum Forms
    Replies: 1
    Last Post: 07-01-2009, 02:50 PM

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