Results 1 to 9 of 9
  1. #1
    vthompson9100@gmail.com is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    5

    Percentage calculation using two tables


    I am a beginner when using access. I have two tables of information. First table has employee authorized data...position and pay criteria. Second table has the employees assigned...name and position. the tables are linked to excel sheets as these get pulled from different sources. I need to come up with a way to find the percentage of positions filled. Example if I have 2 positions authorized but only 1 position filled it would return 50%.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Make Query 1 that counts all positions, 2 fields, this is the total of positions ,assigned or not.
    Make Query 2 that counts the people filled in a position.
    make Query 3, bring in Q1 and Q2, but DO NOT LINK THEM. Bring down the fields and make a new virtual field that calculates:
    Pct: [filled count]/[total]

  3. #3
    vthompson9100@gmail.com is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    5
    Hugely apprecaite the help. How would I be able to get a breakdown by position. Looks like the above gives a percentage of the whole. Looking to get percentages by position. For example if I have two positions for accountants and 4 pos. for line operators I need to know that breakdown for each. If I have 2 of 2 accountants that would be 100% but for line operators only having 3 pos. Filled leaves me 75% manned.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    No you need to bring down the position field. This counts by position.

  5. #5
    vthompson9100@gmail.com is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    5
    What would the expression look like for comparing the data in the different queries? Also probably would need to somehow single out in the expressikn the position name somehow....

    Hugely apprecaite the help.

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Can you give examples of your source data, the problem here is being able to count 'available' positions vs 'filled' positions, if you can find a link between the two you're in business, otherwise it becomes a little tricky.

  7. #7
    vthompson9100@gmail.com is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    5
    Column headings are: Pay Rate: "6"; position: "accountant/line operator" in the table for those filling a position and very similar in the authorized table

    Assigned/Authorized Tables.
    PAY RATE POSITION
    6 Accountant
    5 Manager
    3 Line Operator
    3 Line Operator
    6 Manager

  8. #8
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Ok, assuming both tables have the positions spelled identically I would do it this way:

    1. Create a query (assuming the table name is 'AVAILABLE' for available positions)

    Code:
    SELECT [Pay Rate], Position, Count([Position]) as PositionsAvailable FROM Available GROUP BY Position, [Pay Rate]
    This query should give you a list of positions and a count of available positions

    2. Create a query (assuming the table name is 'FILLED' for filled positions)

    Code:
    SELECT [Pay Rate], Position, Count([Position]) as PositionsFilled FROM Filled GROUP BY Position, [Pay Rate]
    this query should give you a list of positions and a count of filled positions

    3. Link the two queries together through the position field, make sure the queries are linked FROM the available query TO the filled query, add the positionsavailable field and the positionsfilled field, then do your % filled calcuation using [positionsfilled]/[positionsavailable]

  9. #9
    vthompson9100@gmail.com is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    5
    Awesome I will give it try. Thanks.

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

Similar Threads

  1. Percentage
    By azhar2006 in forum Queries
    Replies: 3
    Last Post: 11-15-2014, 02:22 PM
  2. Percentage calculation
    By CS_10 in forum Reports
    Replies: 36
    Last Post: 04-09-2014, 12:29 PM
  3. RelationShip Between Tables & Calculation
    By braveali in forum Access
    Replies: 5
    Last Post: 01-01-2014, 04:15 PM
  4. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  5. Percentage Calculation in a Query
    By Lynn in forum Queries
    Replies: 1
    Last Post: 07-16-2010, 11:23 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