Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimum and Maximum Values within a Group, then Calculate Time DIffer

Status
Not open for further replies.

eric333

IS-IT--Management
Nov 3, 2007
76
US
Hello,

I have a series of transactions in a table. Each transaction is associated with a tracking number and has a date/time. There are multiple transactions for each tracking number. I have grouped the transactions by tracking number.

I want to identify the first (minimum) transaction within the tracking number group, then last (maximum) transaction within the tracking number group, then calculate the difference between the two. Ultimately, I will want to total the calculation of all of the time for each tracking number.

I can handle the time calculations using DateDiff and the overall total using just a simple summary. But, how do I identify the minimum and maximum transaction within each group?

Thanks!!!!
 
Simply use minimum or maximum({transaction_date}, {tracking_number})

The second argument controls the grouping level of the summary.

hth,
- Ido

view, export, burst, email, and schedule Crystal Reports.
 
Thank you VERY much.

BTW - HUGE fan of your software.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top