![]() ![]() Find the records that contain top or bottom values For more information about doing so, see the section Find the top or bottom values for records in categories or groups, later in this article. You can omit category data only when you create a totals query that runs against all records, such as "show me the top five percent of the most expensive orders." Also, you can use either a select or a totals query to find the top and bottom values in a group of records or records that fall into categories. You can use more than one data field and, if you use a totals query, your data fields usually should include category information, such as a city or country/region field. Rules for creating and using top values queriesĪs you proceed, remember that, regardless of query type (a select query or a totals query), you must use fields that contain descriptive data, such as employee or product names, and a field that contains the top or bottom values that you want to find, such as a price or a date field. This figure illustrates a sample filter in query Design view and the results that such a filter can produce:įor more information about creating and using filters, see the article Apply a filter to view select records in an Access database. For example, to see the products with prices between $50 and $100, you apply a filter. If you want to return all the records where the value in a field matches, or is either less than or greater than a value in which you are interested, you apply a filter. If you want to return the records that contain the highest or lowest values in a field, and you do not know the exact top or bottom field values (or they don't matter), you create a top values query. To determine whether you should create a top values query or apply a filter, consider the following: You can specify a percentage, such as the top 5 percent of values in a field, or you can specify a fixed number, such as the top 10 values in a field.Ĭhoosing between a top values query and a filter Specify the number of records that you want the query to return. Also, you can use either type of query to find the top and bottom values in either a group of records or records that fall into categories. To answer a question such as "Which products in each of our product categories occupy the top or bottom five percent of sales," you use a totals query. For example, if you want to answer a question such as "What is the most or least expensive product," you start by creating a select query. ![]() You use a totals query to find the top or bottom values in in one or more categories. You use a select query to find top or bottom values in a table. The process of creating a top values query follows these broad steps:Ĭreate either a select query or a totals query. You can use a top values queries to search for numeric (including currency) and date values. Put briefly, a top-values query sorts and then filters your data to return the top or bottom values in a field. Which products in each of the product categories occupy the top or bottom five percent of sales? Which products occupy the top or bottom five percent of sales? Which divisions generated the greatest or least sales during the current year? Which three employees have the next birthdays? Which is the most or least expensive product? You can use a top value query to answer the following types of questions. You use a top value query when you need to find records that contain the top or bottom values in a table field. What do you want to do?įind the records that contain top or bottom valuesįind the top or bottom values for records in categories or groupsįind the records that contain top and bottom values You use top value queries to answer a variety of business questions, such as which products sell well and which do not. This article explains how to use a top value query in Access to find the highest or lowest values in a set of records. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |