Apply a filter to database collection before downloading to CSV

For example, filter by Date.