Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Display Second Fastest Truck

Display Second Fastest Truck

Display Second Fastest Truck

My data consist of records with Incident Numbers. Within these incident records are several trucks with a response time attached to each truck:

Incident Number - 160039
Truck - E34 ____ Response - 2.85
Truck - E35 ____ Response - 2.83
Truck - T34 ____ Response - 6.30
Truck - A35 ____ Response - 3.34

Incident Number - 160423
Truck - E34 ____ Response - 4.21
Truck - E35 ____ Response - 3.55
Truck - T34 ____ Response - 3.19
Truck - A35 ____ Response - 5.62

I need to report on the second fastest truck. For example:

Incident Number 160039
Truck E34 - Response 2.85

Incident Number 160423
Truck E35 - Response 3.55

How can I accomplish this?

RE: Display Second Fastest Truck

I achieved it this way.
  • Create group on {Table.Incident};
  • Sort records ascending on {Table.Response};
  • Create Group Selection formula as follows:


    {Table.Response} <> MINIMUM({Table.Response}, {Table.Incident}) 
  • Move {Table.Truck} and {Table.Response} from Details section to Group Header section
Hope this helps.


RE: Display Second Fastest Truck

You have not identified what would happen if there was only 1 Truck. My solution would not return a result if only 1 Truck responded.

If you would want to be able to identify incidents where only one truck responded, you would need to use a variable.


RE: Display Second Fastest Truck

Hi Pete -

I am trying to get the 2nd fastest truck. I think what you described would give me the 1st truck.

Thanks - Lynn

RE: Display Second Fastest Truck

Pete's 'Group Selection' formula would exclude (it would not display) the fastest truck from the sorted list of trucks.

RE: Display Second Fastest Truck

zidol, did you at least try my solution?

The Group Selection excludes the fastest truck from the display (as AndyMc states) so the contents of the Group Header now will show the next (2nd) fastest.


RE: Display Second Fastest Truck

I have not tried it - I am having problems with connection to my database. Hopefully I can tomorrow.

Question - what if I want to know the 3rd fastest?

RE: Display Second Fastest Truck

Good morning -

I finally got to try the formula and it does work great.
How can I find out what the 3rd fastest truck?

RE: Display Second Fastest Truck

This will work:
  • Create Group on {Table.Incident};
  • Create Running Total {#RT}: Field to Summarize = {Table.Incident}; Evaluate = For each Record; Type of Summary = Count; Reset = On Change of Group ({Table.Incident});
  • Conditionally Suppress Details section using the following formula:


    {#RT} <> 3 
In need, you could create a Parameter so the user could enter which truck they wanted to report on. In that case, the Conditional Suppression formula would be


{#RT} <> {?Param Name} 

Hope this helps.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close