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

Last Date Retrieval 1

Status
Not open for further replies.

reidtw

MIS
Feb 10, 2004
74
GB
I have a market security price file from which I need to extract the last price for each security id.

I am grouping by security id, then sorting by date but I could not find a function that would filter the file to pull through the last record of each group i.e. the latest price for each security. Any ideas?

T
 
You have several options:

1-Go to report->edit selection formula->GROUP and enter:

{table.date} = maximum({table.date}, {table.securityID})

//assuming you have grouped on {table.securityID}

2-Go to format->section->details->suppress and enter:

{table.date} <> maximum({table.date}, {table.securityID})

3-Sort your datefield in descending order and then drag the detail fields into a group header section (or sort ascending, and drag into the group footer section).

-LB


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top