That sounds like a typical set up for a chart, but it's not really clear what kind of chart you have in mind.
I'm not sure what I was thinking there. I'll try and do a better job of explaining the situation.
I have a relationship of CLIENTS ---< Renewals
In the Renewals Table I have a field called "monthly premium"
On a Clients layout, I would like to have a chart that shows their monthly premium for only the past 2 years (There will be 1 record for each year that the client has renewed)
I've been able to create the chart, but it currently shows values for every record. Is it possible to limit it to just the 2 most recent years?
Can you describe what you want the chart to look like? That sounds like you get a chart with exactly two bars or other y values--one for each year and that doesn't seem a very useful chart.
It would be a bar chart with exactly two bars, but there would be more data points added eventually. But I need to restrict it to the past 2 years
Is this something that is not possible?
There are any number of options. What you plan to do once you get your two bars in a bar chart may well argue for one method over another. The key is in your data source settings for the chart object. Simplist is to set up a delimited data option with this calculation for your Y-series:
LeftValues ( Renewals::Premium ; 2 )
your x-series might be:
LeftValues ( Renewals::Year )
ExecuteSQL can also be used to produce delimited lists of data.for charting.