You are here:

Filemaker/50 DAY MOVING AVERAGE WITHOUT EXTRA LAYOUTS

Advertisement


Question
DEAR SIR, GOOD MORNING, AND MERRY CHRISTMAS
I HAVE A TABLE WITH MANY RECORDS, AND I WOULD LIKE TO AVERAGE ALWAYS THE LAST 50 RECORDS AND INSERT THE VALUE AT A FIELD NEXT TO THE LAST RECORD.
SO WHEN I INSERT A NEW RECORD, I HAVE ONE FIELD WITH DATE, ONE FIELD WITH THE VALUE AT THAT DATE, AND ONE FIELD AUTO CALCULATED WITH THE AVERAGE OF THE LAST 50 DAYS VALUE FIELD.
I WANT TO DO THAT ONLY WITH SCRIPTS WITHOUT EXTRA LAYOUTS.
COULD YOU PLEASE DIRECT ME HOW TO DO THAT ?
IS IT POSSIBLE TO HELP ME WITH THE SYNTAX OF ANY LOOPS YOU USE PLEAS
YOUR HELP WILL BE GREATLY APPRECIATED
BEST REGARDS
CONSTANDINOS

Answer
Hello Constandinos and Merry Christmas and Happy New Year

I am sorry for taking so long to get back to you.


The first thing I would recommend is to make a new field called "Record Number".   It is a calculation that will be the current record number.  Then make a field called "Current".   Current will be a calculation that will say "If (Record Number) < 51; X; "")   Do you understand how this will work?


Then, we can get an average of the last 50 records.    Do you see what Im getting at?  Email me directly.

Jamey
jameykey@jkat.com

Filemaker

All Answers


Answers by Expert:


Ask Experts

Volunteer


Jamey Key

Expertise

NEW and INTERMEDIATE USERS. WHAT CAN FILEMAKER PRO DO FOR ME? I have been using FileMaker products for over 10 years and have basic knowledge in all areas of FileMaker database set up and use. I`m not prepared to answer questions about complex situations or calculations but can help beginners and intermediate users set up and use FileMaker databases.

Experience

Have been using FileMaker since 1989 in our business. We have 10 users on the network who use these databases every day. Our largest databases have had over 30,000 records at one time. In 1995 one of my files was chosen as "Most Unique Database" in a contest sponsored by Claris, maker of FileMaker. Recently I have developed a set of files for new computer system installed at our church.

©2016 About.com. All rights reserved.