Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grouping values as a range 1

Status
Not open for further replies.

Firuz

MIS
Aug 6, 2000
3
AZ
I have a column with number values. <br>I wanna make 3 ranges by using criterias like 0&lt;x&lt;10,10&lt;x&lt;20, 20&lt;x&lt;30 and I wanna see the ranges as 3 columns with counted(not summed) values. <br><br>thanks in advance!<br><br>
 
Give us a sceanrio.<br><br>Field1&nbsp;&nbsp;&nbsp;Field2<br>1234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;la de dah<br>3213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;la de dah<br>2323&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;la de dah<br><br>and a result that you want. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Go to the QBE and create 3 calculated columns like the following. <br><br><br>IIf (field &gt; 0 and field &lt; 11), 1, 0)<br>IIf (field &gt; 10 and field &lt; 21), 1, 0)<br>IIf (field &gt; 20 and field &lt; 31), 1, 0) <br><br>Then SUM the columns and this will give you a count of the values that fall in the different ranges.<br><br>Jerry
 
Hmmm, when I SUM, I get the sum. I use COUNT to get the count. :)
 
CMMRFRDS:

You had an extra &quot;)&quot; in the EXPRESSION, but it worked for my purposes!!!

You saved me a great deal of time and pain!! Thanks! [2thumbsup] &quot;Get it right the first time, that's the main thing...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top