Report Filter: Most Recent Instance

Scenario

Your REDCap project has a repeating survey. You want to create a report that displays only the most recent submission for each record.

Create the Report

Navigate to the Data Exports, Reports, and Stats page.

Click + Create New Report.

Name the report. Under Step 2: Fields to include in report, select fields from the repeating instrument. Decide whether you want to include the name of the form and the repeating instance number in your report.

Filter by Instance

Under Step 3, click “Use advanced logic” to define a filter based on smart variables.

In the “Advanced filter logic” box, use the following syntax to limit records to the most recent repeating instance:

[current-instance]=[last-instance]

Finally, uncheck the “Show data for all repeating instruments/events for each record returned” box. This will ensure that only the instances captured by your filter will be returned.

Click “Save” and view your report.

Attachments