Create a calculation field, type Date, as
BodyAgeDate - Day ( BodyAgeDate ) + 1
Create a summary field, type ? (Average?), that summarizes the Weight field
In the Chart object, select Current records – summary values as data source.
For the x axis, specify a calculation like
Left ( MonthName ( BodyAgeDate ) ; 3 ) & " " & Year ( BodyAgeDate )
For the y axis, specify the summary field.
Find the records to summarize, then (important!) sort that found set by the calculation field.
Thank you! One more question. Is there a way for me to just show the last 3 months of data?
Sure; create a script like:
Enter Find Mode [ no pause ]
Set Field [ target field: YourTableName::BodyAgeDate ; calculated result: ">=" & Get ( CurrentDate ) - 90 ]
Set Error Capture [ on ]
Perform Find [ no restore ]
If [ not Get ( FoundCount ) ]
# [ no matching records found ; show all records, or display a dialog, or … ]
Sort Records [ theCalculatedDateField ]
You can of course search for exactly the last three months, but if 90 days does the job …
Thank you! Where do I put the script? This graph is actually on the same layout with a lot of of data fields.
Thank you for your help.