Grouping TOP values

monkeytunes

Serf of the Jungle
Local time
Today, 04:23
Joined
Jun 8, 2004
Messages
120
Hey buddays,

So, I've got this report, and I'm pulling the top 10 costs of orders in the source query using the TopValues property. (10 records. Easy.)

But the execs want to compare across years. So...

What if I want the report to show the top 10 orders for two years? In other words, group the top 10 orders from 2006, followed by the top 10 orders from 2007? (Top 20 records, dividing 10X10 across two years.)

But the execs want to know if they're doing better than The Other Guys. So...

What if I need to add whether they were from the U.S. or Canada?
(Top 40 records - 10 for U.S. 2006, 10 for Canada 2006, 10 for U.S. 2007, 10 for Canda 2007)

I keep getting hung up with the right number of records but uneven distributions - i.e. I'll get 20 records back from the source query, but if 2007 was an expensive year, then I might have the 18 records in 2007 and two in 2006, instead of the top 10 from 2007 and the top 10 from 2006.

I've considered creating seperate TOP queries for all 4 iterations, and simply putting them in subreports, arranged strategically. Is that the right approach? My concern is that they'll want to start seeing it by State or Region, and before you know it, I've got 100+ queries and subforms on my hands, rather than just adding another grouping level on a report!

Thanks for your help!
 
Last edited:
Just giving it a bump in case anybody has some ideas...? Thanks!
 

Users who are viewing this thread

Back
Top Bottom