Results 1 to 4 of 4
  1. #1
    therzakid is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2011
    Posts
    22

    group by a range of values

    Hello, I've created a database that tracks all the sales. I now want to look at how many sales occur in certain price bands. I've created a query for this but haven't been able to group the sales prices together e.g. 0 to 500, 500 to 650, etc... Thanks for any advice or suggestions you might have!

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    In your sales field criteria in your query, type between 0 and 500. This will give you all sales from zero to 500. Change accordingly.

    Alan

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    you could also create a label (if you're attempting to look at the sales totals for different price brackets by adding a totals line to your query and building your own label something like:

    iif(SalesTotal < 500, "Under 500", iif(SalesTotal < 1000, "500 - 1000","Over 1000"))

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    After seeing rpeare's suggestion it brought another idea to mind. You could set up a range of categories as rpeare suggested and create a cross tab query.

    If you have not set up a cross tab query, here is a quick video on how to do it.

    http://www.datapigtechnologies.com/f.../crosstab.html



    Alan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Resetting Option Group Values
    By oleBucky in forum Forms
    Replies: 4
    Last Post: 03-31-2011, 05:19 PM
  2. option group default values
    By wlumpkin in forum Access
    Replies: 3
    Last Post: 02-15-2011, 03:30 PM
  3. option group default values
    By wlumpkin in forum Access
    Replies: 6
    Last Post: 02-07-2011, 06:07 PM
  4. date range form values as parameters
    By cfnieder in forum Forms
    Replies: 8
    Last Post: 08-11-2010, 01:48 PM
  5. Sum of Values over date range
    By bosnian in forum Queries
    Replies: 1
    Last Post: 01-12-2010, 03:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums