Originally posted by BrianBischof
This sounds like a different question. You said that if they don't have a XX reading in June then they shouldn't be in the report. Now you want them in the report if they had it 3 months ago? Confused. Can you clarify what the question is?
It shouldn't be included because yy is the most recent value, not xx. It's not a matter of whether it's in June or not. The most recent reading does not have to be in this current month. The most recent reading could be this month, last month, or 3 months ago. Let's say today is August, if the latest BMI reading of a patient was from February and the value is XX, then I would need that patient in the report.
If I use the formula Month{CurrentDate}, doesn't that mean the query will only look for values recorded this month (August)?