Article ID: 132056
Article Last Modified on 1/19/2007
Query: Top_N_Products
----------------------------------------------------------
Type: Select Query
Join: Order Details.[ProductID] <-> Products.[ProductID]
TopValues: 5
NOTE: In version 2.0, type a space in the Product ID field.
Field: CategoryID
Table: Products
Total: Group By
Criteria: [Reports]![Top_N_Per_Group]![CategoryID]
NOTE: In version 2.0, type a space in the Category ID field.
Field: ProductName
Table: Products
Total: Group By
NOTE: In version 2.0, there is a space in the Product Name field.
Field: SaleAmount: Sum([Order Details].[UnitPrice]*[Quantity])
Total: Expression
Sort: Descending
NOTE: In version 2.0, type a space in the Unit Price field.
NOTE: Referencing the CategoryID from the Top_N_Per_Group report
as criteria ensures that this query filters records by CategoryID
before it applies the TopValues property to the recordset.
Keywords: kbhowto kbusage KB132056