UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> No of Boxes: -Int(-[Box Count]/100*68) is not calculating % properly??    
 
   
mark909
post Jul 29 2009, 08:24 AM
Post #1

UtterAccess Addict
Posts: 117



Hello im having troubles with a calculation.

Im trying to calculate 68% of [Box Count]. i.e 68% of the number of boxes present in the Column "Box Count" using the following query:

No of Boxes: -Int(-[Box Count]/100*68)

The box count is 593.

68% of 593 is 403.24.

Rounded this should be 404 however when i run the query I get 414

Anyone know why this is or can give me a better solution to rounding up a percentage??

Thanks for Help! (IMG:http://www.utteraccess.com/forum/style_emoticons/default/sad.gif)
Go to the top of the page
 
+
vtd
post Jul 29 2009, 08:36 AM
Post #2

Retired Moderator
Posts: 19,667



The expression looks correct to me and testing in the Debug window gives correct return value:

?-Int(-593/100*68)
404

Check and make sure your BoxCount is 593.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 10:16 PM