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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum or last record 1

Status
Not open for further replies.

crneophyte

Technical User
Jul 19, 2005
2
US
Hi.

I am trying to provide the most current record/value by state.
Sample
TP Zone Cls StartDate EndDate Value Condrec
A1 Fl MW 2/3/2004 10/26/2005 1.75 101
A1 Fl MW 10/27/2005 12/31/2006 1.30 123

Result should be the second line with value = 1.30
I tried Maximum ({table1.Codrec}, {table1.State}) but it gives me the first record it finds.

Any help is appreciated.

Thanks,
crneophyte
 
Assuming you have a date on {table.state}, go to report->edit selection formulas->GROUP and enter:

{table.enddate} = maximum({table.enddate},{table.state})

This assumes that most recent record will always have the latest enddate.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top