Quintiles/Percentiles

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I am trying to split my data set into five equal parts.
Any ideas? I have tried TOP N, TOP N PERCENT, sub-
queries, but no use. Thanks.
 
Dear Jeremy:

I am thinking that if you rank the rows and count them, you could then
perform integer division of the rank value by 1/5 of the total count,
yeilding a value 0 to 4 which divides the results into 5 roughly equal
sets.

If the value on which you rank is not unique (ties between multiple
rows) or if the total number of rows in the query is not exactly
divisible by 5, then you are not going to get 5 sets with exactly the
same number of rows, but that's to be expected.

I am trying to split my data set into five equal parts.
Any ideas? I have tried TOP N, TOP N PERCENT, sub-
queries, but no use. Thanks.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top