Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percentage Rounding

Status
Not open for further replies.

sadromeo

IS-IT--Management
Dec 12, 2001
5
US
I'm having a serious problem with Access's report percentage rounding. Let me explain.

For example, my total # of records is 14

And it's broken down like this

Category 1 has 3 records.
Category 2 has 9 records.
Category 3 has 2 records.

So far they equal 14 which is correct; however, if I have a field on the report that says, ([Category#]/[Total # of records]) these are the percentages I get when using no decimals:

Category 1 21%
Category 2 64%
Category 3 14%
Total 99%

How is this possible?? Shouldn't all percentages equal 100?? Can anyone explain what I can do to resolve this or why this happens so I can fix it???

Thanks so much!
Chad
 
Not much you can do except to not round the percentages.

33.33333 rounds to 33

3*33.33333 = 100
33 * 3 = 99

You could hardcode the total to be 100% instead of the sum of the fields?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top