Percents to Total 100

J

Janna

For a database that tracks investments, on the reports, I need to show the
percent of the total amount invested in each institution, the percent by
fund, the percent by security type. I'm having trouble getting the
individual percentages to add up to 100% at the bottom of the report.
Sometimes it will be 99.999% or 100.01%. I've tried the round function, for
example =Round([txtCurAmt]/[textTotal],3); but haven't had consistent results.

Is there a way to consistently have the invididual percentages round and
display so that they always total to equal 100%? Thanks.
 
S

Stefan Hoffmann

hi Janna,
I'm having trouble getting the
individual percentages to add up to 100% at the bottom of the report.
Sometimes it will be 99.999% or 100.01%. I've tried the round function, for
example =Round([txtCurAmt]/[textTotal],3); but haven't had consistent results.
As floating point arithemtics are unprecise you have to live with that.
In most cases it is sufficent to use Currency cast, as Currency is a
precise on four significant digits.

Try =CCur(CCur(textCurAmt) / CCur(textTotal)).


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top