Sorting values into groups or "buckets"

fvreg

Registered User.
Local time
Today, 16:35
Joined
Sep 15, 2005
Messages
15
I have a large data set with values ranging from 1-25,000. I would like to be able to calculate how many entries there are in each increment of 10 (1-10, 10-20, etc.), then perform the same query for each increment of 100.
Any ideas?
 
I've seen a solution to your question in the Access Advisor magazine. I could find the answer in my back copies.

I recall that it was via a complex WHERE, but not specifically what it was.
 
You could create a function based on a Case statement and then use the function in a calculated field in your query. Sorry, my coding isn't good enough to do this without a lot of prototyping.
 
divide your number by 10 and round it down.
GroupNum:int(([MyNumberField]/10))
Then base a group by query on this query using one field to group on GroupNum and another to count it
The only problem with this is that it won't give you a Zero count for empty buckets

HTH

Peter

This will give groupings of 0-9,10-19,20-29...
 
Last edited:

Users who are viewing this thread

Back
Top Bottom