How to limit number of records in a group

Babak

Registered User.
Local time
Today, 05:54
Joined
Jul 29, 2013
Messages
16
Hey I have a report that is group based on a number refered to as "Line". I want to only have three records per group. How can I do this?

Thanks in advance
 
I want the top 3 "Downtime" for each "Line". The table is called "Top 3 Downtime" and I put this in the criteria of Downtime.

In (Select Top 3 [Downtime] From [Top 3 DownTime] Where
[Line]=[Top 3 DownTime].[Line] Order By [Downtime] Desc)

For some reason, this is only returning the top Downtime for 4 of the lines instead of 3 for all of the lines. Do you know why this is?
 
To be more specific, its only returning the top 3 "Downtime" without taking "line" into consideration
 
Did you read the thread pbaldy linked to? It does pretty much exactly what you're after.
 
Hey David I did method one but for some reason, I am getting the top 3 period instead of the top 3 for each line. Can you look at my code above and see what I did wrong.
 

Users who are viewing this thread

Back
Top Bottom