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

Maximum function at the query level

Status
Not open for further replies.

pbbradley

Programmer
Dec 1, 2011
1
US
I have a query that shows an entry date and an exit date for students - the data for each student for each school year has an entry an exit date.
example
student 101 in school year 07-08
Entry Date = 8/28/07
Exit date = 6/15/08
student 101 in the next school year 08-09
entry date = 8/26/08
exit date = 6/22/09

and this goes until they graduate

I want to capture the max exit date for student 101 at the query level in a filter but I get an error when I validate the filter

maximum ([Withdraw Date - E/W])
wrong expression type is the error message

any ideas????
PB
 
A filter is an expression that should be either true or false. In case of dates this usually becomes something like:

Code:
[Withdraw Date - E/W] = maximum([Withdraw Date - E/W] for [student_id])

You probably need to set the filter properties to 'after auto-aggregation' as well

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top