Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Percentages (2003)

    I have a simple table which holds how much time is spent on certain jobs. This is based on 4 people doing these jobs, working 8 hours/day = 32. I've used an expression for each field in the query like Round([Breakdown]/32,2). This gives me a percentage, but when added, I get 101. Apart from the date, all the colums on the query calculate the percentage.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Percentages (2003)

    It's probably due to rounding errors. Take the following simple example:

    <table border=1><td>Unrounded</td><td>Rounded</td><td align=right>30.8%</td><td align=right>31%</td><td align=right>40.6%</td><td align=right>41%</td><td align=right>28.6%</td><td align=right>29%</td></table>
    The unrounded percentages add to exactly 100.0%, but the rounded values to 101%, yet each individual value is rounded correctly. Unless you want to apply sophisticated algorithms to tweak the rounding, you'll have to live with it.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Percentages (2003)

    Are you actually adding them up on a form, or are you worried that users will add them in their heads?

    If you want to display a total youself, you could have both the rounded and unrounded in the query. Display the rounded values, but add up the unrounded ones.

    Or round to three figures instead of two, and the problem will be less obvious.
    Regards
    John



  4. #4
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Percentages (2003)

    The actual hours entered are totalled on the form, so they don't enter too many. The percentages are worked out on the query.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •