Results 1 to 5 of 5
  1. #1
    blackstatic42 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Posts
    5

    percent

    I have a list of user grouped by the state they live and a count showing how many people are in each state my goal is to also put what percentage each group is out of the total users.


    how would I go about creating this?

    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Options:

    1. Build a report using Grouping & Sorting features and aggregate calcs in group header/footer. Create a group on state field. Calculate total users in report footer. Calculate total users in group footer. Divide group total by report total to get percentage.

    2. Build an aggregate query that calculates the total user count. This will result in a single record of the total. Do another aggregate query that totals by state. Include both queries in another query without a join clause. This will cause the single record to join with every record of the state group query. Now can calculate the percentage in this query.

    3. Use DCount domain aggregate functions in a query.
    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.

  3. #3
    blackstatic42 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Posts
    5
    I like option1

    my State group header

    ="Total Customers from" & " " & [ST] & ": " & Count(*)

    And

    my report footer

    ="Total Customers" & " " & Count(*)

    How would I make this percent thing work

  4. #4
    blackstatic42 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Posts
    5
    Or option 3 sounds good

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    You can't have the Count(*) concatenated with text. That does not give a value that can be used in subsequent calculations. Put text in label and expression in textbox. Then in a textbox next to the state count, like:

    =tbxState / tbxTotal * 100
    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. Replies: 3
    Last Post: 05-24-2013, 08:02 AM
  2. percent query rounding less than .5 up
    By jtmo3 in forum Queries
    Replies: 3
    Last Post: 05-04-2012, 02:52 PM
  3. Negative percent on a report
    By bcoots in forum Reports
    Replies: 2
    Last Post: 01-05-2012, 03:05 PM
  4. Auto Updating Percent
    By walter189 in forum Reports
    Replies: 1
    Last Post: 09-07-2011, 01:34 PM
  5. workinkg hours by percent
    By Mosely in forum Queries
    Replies: 1
    Last Post: 11-01-2010, 09:32 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