Calculating Percentages

  • Thread starter Thread starter Stan
  • Start date Start date
S

Stan

I am trying to get what % of a number and I am getting a
0% as the answer.

I have created a test table with two fields
The field format for both fields are Long Integers,
Standard format, 2 Decimals. I have also tried Double.

The first field is Pgla which is equal to 28,436
The second field is Tcmlbrr which is equal to 1,877

The formula in the query is tcmlbrr\pgla

The answer should be .06 the answer I am getting is 0.

I do not understand this answer at all.

Can someone please explain this answer to me.
 
Stan,

You should be using tcmlbrr/pgla (with a slash, not a backslash)! The
backslash returns the integer part of the result, therefore 0.06 is
returned as 0.

Note: If your fields are defined as type Long Integer, no matter how
many decimals you declare, none will be stored. If you are going to need
decimals then use Double datatype.

HTH,
Nikos
 
your formula should be tcmlbrr/pgla not tcmlbrr\pgla


I think that \ makes your answer a whole number. .06 is a fraction.

Rick B
 
Thanks that works
-----Original Message-----
your formula should be tcmlbrr/pgla not tcmlbrr\pgla


I think that \ makes your answer a whole number. .06 is a fraction.

Rick B






.
 
Back
Top