Averages in Query - Rounded (1 Viewer)

razorking

Registered User.
Local time
Yesterday, 22:58
Joined
Aug 27, 2004
Messages
332
I must be missing something obvious on this. I have a query where I want to calculate an average of numbers in grouped field. I am simply using the QBE grid and then Totals - and then selecting the filed, and Avg. The results are displaying like this:

AvgOfLENGTH
133
128
119.8
126.4
126.529411764705882352941
130
123.647058823529411764706
112

I just want these rounded. I would want 119.8 to be 120 and 126.4 to be 126 and 126.529411764705882352941 to be 127. How do I do this?
 

MarkK

bit cruncher
Local time
Yesterday, 22:58
Joined
Mar 17, 2004
Messages
8,178
You can right click on the field in the QBE and set the field's Format property. Try set it to 0. Also, you can execute the Round() function on the field in question, like...
Code:
SELECT Round(Avg(Field1), 0) As RoundedAvgOfField1
FROM tYourTable
hth
Mark
 

razorking

Registered User.
Local time
Yesterday, 22:58
Joined
Aug 27, 2004
Messages
332
That works Mark - thank you very much!
 

Users who are viewing this thread

Top Bottom