Share via

Frequency Distribution in access

Anonymous
2010-09-20T19:33:48+00:00

I have a table in Access where I want to do a frequency distribution on it.  I can do this in Excel but I have over 60000 records and it is too slow.

Basically,

I want to know the number of people that fall into certain categories of sales.

Say between

14000 - 14500

15000-15500 and so forth

I want the count on these people in these categories and then I know how to split them out from there.  What is the easiest way to do this?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-09-20T19:46:06+00:00

That sounds like a group/total query. 

Define a table which will give the limits, like:

LowMark   HighMark   GroupName   'fields

0               1500           0-1500

1500          2500          1500-2500

0               2500          0-2500

...   data sample.

Note that the groups may overlap, if is what you really want (such as having a count for each state, then for the whol USA, as example).

Next, define a query which will include your initial data AND the previous table (assume it is called Ranges). Be sure it is changed to a TOTAL query. Have the field "value"  from the original table in the grid, change change the GROUP BY to COUNT. Bring it a second time, this tiime, change the GROUP BY to WHERE and add the criteria:

>= [ranges].[LowMark]

Add the field "value" a third time, change the GROUP BY to WHERE, with the criteria:

<  [ranges].[highmark]

(note the use of a strict inequality, not  <=  but only   < )

Finally, add the Rnages.GroupName in the grid, and keep the proposed GROUP BY.

That's all.

Was this answer helpful?

0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-09-21T12:49:57+00:00

    The WHERE clause implying TWO tables  does the join (inner join)  IMPLICITLY. In general, an explicit join is prefered, but here, with inequality, you would lose the graphical capabilities, so, for marginal performance penality, it may be better to keep the implicit join AND graphical capability.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-09-20T19:57:22+00:00

    Never mind.  Got it to work.  THANK YOU!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-09-20T19:56:15+00:00

    Will Partition work for you?   Syntax -  Partition([YourField], Start, End, Segment)

    SELECT Partition([Ck_B],14000,75000,500) AS Expr1, Count(Data.Ck_B) AS CountOfCk_B

    FROM Data

    GROUP BY Partition([Ck_B],14000,75000,500);


    Build a little, test a little.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-09-20T19:55:17+00:00

    Am I supposed to join the tables by anything?

    Was this answer helpful?

    0 comments No comments