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

Return previous activity

Status
Not open for further replies.

n2nuk

IS-IT--Management
Dec 24, 2002
190
GB
I have a report of clients that were engaged in a particular activity during Oct to Dec 2014.
What i would like to do is to return the activity they were engaged in prior to the activity that i am reporting on
Any ideas how i can do this?

The data i am returning comprises of the following

client_id
client_name
act_start_date
act_end_date
act_code
act_description

Regards



 
If you have them sorted correctly, you can use the Previous function.

Create formula @prevact

if {table.client_id} = previous({table.client_id})
then previous({table.act_description})
else "No Prior Activity
 
Many thanks for the speedy response, however i am getting "No Previous Activity" for all rows even though i am sure some most will have a previous activity,
any ideas?
 
Be sure your data is sorted correctly.
Client ID (Ascending)
act_start_date (Ascending)

If your date fields are character instead of actual dates, then create a SortDate formula:
Date({table.dact_start_date}) and use that as your second sort field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top