Solved

Issue with percentages and 1

Posted on 2007-11-15
13
140 Views
Last Modified: 2010-04-21
I have an issue with one of my reports and so to test it I opened up the Immediates pain window and entered the values that I wanted:

I simply want to find 1% of 1052

?(1/1052)*100
 9.50570342205323E-02

It should be 0.095057034

What am I doing wrong?
0
Comment
Question by:Andy Brown
  • 6
  • 4
  • 2
  • +1
13 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20288615
nothing... that is correct,
try



?format((1/1052)*100,"percent")
0
 
LVL 14

Expert Comment

by:bluelizard
ID: 20288725
correct me if i'm wrong, but wouldn't p% of n be calculated like this:

   n * ( p / 100 )

?

if so, you'd find

? 1052 * ( 1 / 100 )
  10.52

no?

what am i missing here?


--bluelizard


0
 

Author Comment

by:Andy Brown
ID: 20288820
Thanks everyone - but so far not quite their

I am looking at call outcomes and counting how many of each there are.

Call back = 151
Company no longer trading =4
Company will not release information =27
Current customer = 8
Dead line =10
Do not Sell to Consumer = 201
Duplicate record = 107
Face to face appointment = 29
Information requested via email = 1
No Financeable Products = 244
No interest = 1
Overseas = 22
Parked = 208
Unobtainable / does not return calls = 6
Wrong number = 33

This totals 1052.  I simply want to put alongside the value what percentage that is.  For example; Wrong numbers (33) = 3.136882129% etc.  But it falls over on the very small numbers?
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20288865
< But it falls over on the very small numbers?> How?
0
 

Author Comment

by:Andy Brown
ID: 20288966
I have a table with

Outcome, Qty, Percentage
Wrong number, 33, 3.1

All of the bigger numbers appear to be correct, but on the very small number (Information requested via email. 1) it comes up with an inflated percentage figure of 9.505, when it should be 0.095057034.

0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20289015
converting 9.50570342205323E-02  by removing the E-02 (means shift the decimal places to the left by 2 spaces) will give you

0.0950570342205323

0.095057034

so basically they are the same
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:Andy Brown
ID: 20289037
How do i do this?
0
 

Author Comment

by:Andy Brown
ID: 20289042
Thinking about it can I detect the E-02 and then fix it - or is there a better way?
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20289055
you may just need to format the results.
did you try this

?format((1/1052)*100,"percent")
0
 

Author Comment

by:Andy Brown
ID: 20289078
That works fine for this instance of 1, but the other larger values to come through correctly.  It's not just 1 either, 2, 3 4 also seem to have the same issue.  Its funny, if you type in the same equation into Excel, it works perfectly =sum(1/1052)*100.
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 20313939
Use either:

strPercent = Format(x / 1052, "percent")
which returns for x = 1 the rounded value 0.10%

or, if you wish four decimals:
strPercent = Format(x / 1052 * 100, "0.0000")
which returns for x = 1 the string 0.00951

/gustav
0
 

Author Closing Comment

by:Andy Brown
ID: 31409314
Thanks for your help on this - sorry for the delay in getting back to you.
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 20598178
You are welcome!

/gustav
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now