Incorrect Sum in Report

A

Amy Feddema

I created a report with a sum for each grouping but the sum is incorrect.
For example, it shows the sum of $12.07 and $13.14 being $25.20 instead of
$25.21. I'm not sure how to correct this problem. Could someone help me
please? Thank you.
 
D

Duane Hookom

This is probably just rounding. The numbers might actually be 12.065 and
13.135 which would result in 25.20.
 
A

Amy Feddema

Thank you for your response, but the numbers are actually 12.07 & 13.14. The
report is based on a table in which the numbers are currency with 2 decimal
places. The data was imported from an Excel spreadsheet that I created and
entered all the data as currency with two decimal places. Any other ideas?
 
D

Duane Hookom

It doesn't matter how the display looks to you. Try set the decimals to a
higher number to confirm the actual number values.
 
A

Amy Feddema

You're correct, of course. When I increased the decimal places, I got the
following values:

$12.067
$13.137
Total: $25.2036

But when I entered the numbers, I entered 12.07 and 13.14. Regardless, how
can I fix this? Thanks for your help.
 
D

Duane Hookom

The only thing to fix is your impression that the numbers are not accurate.
Maybe show more decimal places in the report.
 
M

Marshall Barton

Duane said:
The only thing to fix is your impression that the numbers are not accurate.
Maybe show more decimal places in the report.


Are you sure the **fields** in the table are Currency type?
It sounds more like they are Single or Double type.
Currency type fields are fixed point numbers with 4 decimal
places, so unless you multiply or divide the values, they
should not be rounded. It's also possible that they are
Currency type but a calculation is (inadvertantly?) causong
them to be recast as a floating point type.

To add to Duane's comments, you can make the report look
like it's adding the way you think it should by summing the
rounded numbers:

=Sum(Round(thefield, 2))

This is not as accurate as the answer you don't like, but
people won't argue with it ;-)
 
Top