Dear Filemaker Community,
How can I split the below graph into years, so that each year has a seperate graph?
This is because there is so much data on the below graph, that it is not showing the latest trends.
Without seeing your ERD, in this case, it sounds like you would want to use SQL and GROUP BY YEAR. Add to that grouping a COUNT of some field you're interested in, like registrations. Then, you'd have counts by year.
You need to "find" for a particular year to show just that year's data in the graph. Is that what you meant?
Thank you for your answer.
I have tried to perform a find within one of the graphs to show just a year.
It says select a field - but how to select a field when one is in find mode on a graph?
Can you explain how you get to the layout with the graph? Do you know if there is a script trigger on the layout?
If there are no "visible" fields on the layout, you can place your date field there. Make sure it is enterable in Find mode, but not in Browse mode if you use it manually.
A Script to find could be:
Enter Find Mode
Set Field [ myDate; "*/*/2017" ]
Sent from miPhone
I do something like this for a customer. In the graph's calculation to show the data, I have something like this:
ExecuteSQL("select 'Date' from <TABLE_NAME> where 'Date' > CURRENT_DATE - 365 order by 'Date' ASC" ; "" ; "")
This extremely simple (yet powerful) SQL will give you a graph that always shows ONLY the last 365 days as you enter more and more data.
This SQL might not be exactly what you want, but it's how I show data for just the "last year" (from today).
As I recommended above, if you want to want COUNTS (or other aggregates) over a year or other period (or grouping by any field, basically), I would strongly suggest using SQL and GROUP BY. SQL and GROUP BY are designed to do exactly that.
Retrieving data ...