Adding up Percentage calculated series of numbers????

L

LD

Adding up Percentage calculated series of numbers????
I am adding a series of numbers that have been rounded to the 2nd decimal
point. I have a calculation to receive a result, such as. (8.9%)123.00= 10.947
thus rounding gets (10.947 rounded to 10.95)
Now if a series of Rounded numbers are totaled (=Sum[Number]) in the footer
I will receive in the total a number that totals not the rounded numbers but
the "real" number out 10.947...... I am using currency format with 2 decimal
settings in the tables General property.
Example:
23.335 rounded = 23.34
12.259 rounded = 12.26
15.237 rounded = 15.24
18.248 rounded = 18.25
_______________________
Real Total 69.079 Rounded Total = 69.09 Or .01 higher than the Real sum
 
R

Rick Brandt

LD said:
Adding up Percentage calculated series of numbers????
I am adding a series of numbers that have been rounded to the 2nd
decimal point. I have a calculation to receive a result, such as.
(8.9%)123.00= 10.947 thus rounding gets (10.947 rounded to 10.95)
Now if a series of Rounded numbers are totaled (=Sum[Number]) in the
footer
I will receive in the total a number that totals not the rounded
numbers but the "real" number out 10.947...... I am using currency
format with 2 decimal settings in the tables General property.
Example:
23.335 rounded = 23.34
12.259 rounded = 12.26
15.237 rounded = 15.24
18.248 rounded = 18.25
_______________________
Real Total 69.079 Rounded Total = 69.09 Or .01 higher than the
Real sum

The decimal setting you applied to your currency field only affects *display*.
You have to do something to produce "actual rounded values" that you can then
sum up.
 
S

Steve Huff

The Sum function is looking at the actual record souce not the formated
display version. If you want it to Sum based on the formated version you
will need to do the formatting at the RecordSource level -- therefore format
it in a query if you do not want to store it as 2 digits in the table.
 
L

LD

Rick I understand that but the question still remain How & with what coding &
where do I place the code.
Thank you for responding!!

Rick Brandt said:
LD said:
Adding up Percentage calculated series of numbers????
I am adding a series of numbers that have been rounded to the 2nd
decimal point. I have a calculation to receive a result, such as.
(8.9%)123.00= 10.947 thus rounding gets (10.947 rounded to 10.95)
Now if a series of Rounded numbers are totaled (=Sum[Number]) in the
footer
I will receive in the total a number that totals not the rounded
numbers but the "real" number out 10.947...... I am using currency
format with 2 decimal settings in the tables General property.
Example:
23.335 rounded = 23.34
12.259 rounded = 12.26
15.237 rounded = 15.24
18.248 rounded = 18.25
_______________________
Real Total 69.079 Rounded Total = 69.09 Or .01 higher than the
Real sum

The decimal setting you applied to your currency field only affects *display*.
You have to do something to produce "actual rounded values" that you can then
sum up.
 
R

Rick Brandt

LD said:
Rick I understand that but the question still remain How & with what
coding & where do I place the code.
Thank you for responding!!

"Rick Brandt" wrote:

If you are using a version that includes the Round() function then add that
wherever you are currently doing your calculation.

Instead of...

[SomeField]*[SomeOtherField]

....use...

Round([SomeField]*[SomeOtherField],2)

The your query is returning actual rounded values, not values that are merely
formatted to look rounded.
 
L

LD

That is helpful!! I am not familar with formating codes that I need to use do
you have any Ideas.
LD

Steve Huff said:
The Sum function is looking at the actual record souce not the formated
display version. If you want it to Sum based on the formated version you
will need to do the formatting at the RecordSource level -- therefore format
it in a query if you do not want to store it as 2 digits in the table.

--
_______________________
Steve Huff
http://www.huffs.us
Generic email: null(removethis)@huffs.us


LD said:
Adding up Percentage calculated series of numbers????
I am adding a series of numbers that have been rounded to the 2nd decimal
point. I have a calculation to receive a result, such as. (8.9%)123.00=
10.947
thus rounding gets (10.947 rounded to 10.95)
Now if a series of Rounded numbers are totaled (=Sum[Number]) in the
footer
I will receive in the total a number that totals not the rounded numbers
but
the "real" number out 10.947...... I am using currency format with 2
decimal
settings in the tables General property.
Example:
23.335 rounded = 23.34
12.259 rounded = 12.26
15.237 rounded = 15.24
18.248 rounded = 18.25
_______________________
Real Total 69.079 Rounded Total = 69.09 Or .01 higher than the Real
sum
 
L

LD

Thanks that really Helped!!!!!!

Rick Brandt said:
LD said:
Rick I understand that but the question still remain How & with what
coding & where do I place the code.
Thank you for responding!!

"Rick Brandt" wrote:

If you are using a version that includes the Round() function then add that
wherever you are currently doing your calculation.

Instead of...

[SomeField]*[SomeOtherField]

....use...

Round([SomeField]*[SomeOtherField],2)

The your query is returning actual rounded values, not values that are merely
formatted to look rounded.
 
S

Steve Huff

To format it in a query use the Fomat function in the SQL. This example
format the field g into the new field name g_formated with 1 decimal place:

SELECT Format([g],"#.#") AS g_formated
FROM Table1;

Then if you refer to that query with the sum function summing g_formated you
will get the results you desire.

--
_______________________
Steve Huff
http://www.huffs.us
Generic email: null(removethis)@huffs.us


LD said:
That is helpful!! I am not familar with formating codes that I need to use
do
you have any Ideas.
LD

Steve Huff said:
The Sum function is looking at the actual record souce not the formated
display version. If you want it to Sum based on the formated version you
will need to do the formatting at the RecordSource level -- therefore
format
it in a query if you do not want to store it as 2 digits in the table.

--
_______________________
Steve Huff
http://www.huffs.us
Generic email: null(removethis)@huffs.us


LD said:
Adding up Percentage calculated series of numbers????
I am adding a series of numbers that have been rounded to the 2nd
decimal
point. I have a calculation to receive a result, such as. (8.9%)123.00=
10.947
thus rounding gets (10.947 rounded to 10.95)
Now if a series of Rounded numbers are totaled (=Sum[Number]) in the
footer
I will receive in the total a number that totals not the rounded
numbers
but
the "real" number out 10.947...... I am using currency format with 2
decimal
settings in the tables General property.
Example:
23.335 rounded = 23.34
12.259 rounded = 12.26
15.237 rounded = 15.24
18.248 rounded = 18.25
_______________________
Real Total 69.079 Rounded Total = 69.09 Or .01 higher than the
Real
sum
 
Top