Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5243 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi, any help would be appreciated with this.

I have records of jobs i do for customers, I am trying to find a way to work out the average days between each job we do ( to predict when they will need us next). At present I have a list of jobs with dates i.e.

1/1/10 Purchased 500 gallons

7/1/10 Purchased 500 gallons

18/1/10 Purchased 600 Gallons

etc...

What I am after is something like:

1/1/10 Purchased 500 gallons

7/1/10 (6 Days) Purchased 500 gallons

18/1/10 ( 11 days) Purchased 600 Gallons

The date used is the creation date of the job record.

Many thanks for looking.

Posted (edited)

Well, if you want to work out the average days between jobs, I believe you could do this directly by:

18/1/10 - 1/1/10 = 17 days;

3 jobs - 1 = 2 intervals in-between jobs;

17 days / 2 intervals = 8.5 days on average.

Or, in more general terms (pseudocode)B)

Max ( Date ) - Min ( Date ) / ( Count ( Jobs ) - 1 )

Edited by Guest
Posted

For that, you will need to define a self-join relationship of the Jobs table, such as:

Jobs::Date > Jobs 2::Date

with records on the Jobs 2 side of the relationship sorted by Date, descending. Then you can calculate the interval as =

Date - Jobs 2::Date

It would probably be better to lookup the previous date into a local field (using the same relationship) in order to speed things up.

This topic is 5243 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.