in a table I have many records based in date field,
how I can have total of records for every year in different fields?
e.g. 25 records for 2015
52 records for 2016
16 records for 2017
If you do what I wrote, that is exactly what you should get. I have added a example file
Add a SubSummary Part in your List and then create a new Calculated Field called Year. In that Calculated field use Year( YourDateFieldName ) . Then create a Summary Field and use Count.
Then in the new Part, put that new field and sort on it. Add the new Summary Field on that Part and you will see each Year and number of date per per
but I want a field with the amount or records per year
e.g. 25 rec for 2016 etc
ExecuteSQL("SELECT SUM(\"field_name\") FROM \"table_name\" WHERE YEAR(\"date_field\") = ?"; ""; ""; 2015)
johanhedman has a great suggestion, but it make the assumption that you are working in list view and want a sub summary report of the data.
thank you both for your replies,
just I want this results in the header not in records,
e.g. 25 rec for 2016, 52 rec 2017 etc
You can use the calculation I provided in a field in a related table with xJoin and display it anywhere independent of records.
Try it as an unstored global calc to test it, but performance may vary using it this way in production.
thank you bigtom
it will be nice if you can sent an example because I am new in filemaker
also in the calculation you send me tell me which fields I put and where...
is exist a possibility in the file you send me,
we can count and how many records we have per month?
e.g. 25 rec for 2016, Jan 10 rec, Feb 9 rec, Mar 6 rec
32 rec for 2017, Jun 12 rec, Jul 9 rec, Aug 11 rec
if you can send a file with this will be nice
Did you even open up my example file?
It will show you in List view number of records per year. Not like you want it to be. To do that you need either ExecuteSQL like BigTom wrote about or do a Script and save information into a Global Field
Johan i open your file and I find usefull
(I make it like a card and I can see the results)
but also I want if is possible to see also per month records per year
You can not use the technique that I used in Card view. For that you need to use ExecuteSQL or a Script to save data
you can send me exambe for both of techniques (sql and script)
in the file you send me
Sorry, but I can not continue to make more example files for you. You have already been given exactly what you asked for from Bigtom for a card information. If you want anything else I suggest you go to www.lynda.com and use the FileMaker Training courses
thank you about your help
Retrieving data ...