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 3505 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have two tables
Parent Table - "Company" 

and Child Table = "Data"

each Company has several related "Data" records individualized by a "YEAR" field.

Each Year, we import new Data for that year.

I need to do some computations between the annual data  records for each Company. For example if current year is 2015, average X from the last 3 years(2015, 2014, 2013). I need to do several calculations like this.

Bonus, is there a way to automatically update these calculations when the new data comes in for 2016, so then the average would automatically become 2016, 2015, 2014?

I'm looking for a maintainable solution and I feel like it's a combination of table relationships and some nice calculations.

Thanks

Posted

Hey Kris,

I don't think Sub Summary Reports will work here. Also, I am not using list views for this data. I am looking directly at the company record...Unless there's a technique I'm missing?

Posted (edited)

 

Each Year, we import new Data for that year.

​Your description is not quite clear. How many data records does a company have per year?

 

In any case, you could define a cLast3Years calculation field in the Companies table =

Year ( Get ( CurrentDate ) ) - Get ( CalculationRepetitionNumber ) + 1

Make the result type a Number, and set the number of repetitions to 3. Then define a relationship between Companies and a new occurrence of the Data table as:

Companies::CompanyID = Data 2::CompanyID
AND
Companies::cLast3Years = Data 2::Year

Now you can use a formula such as:

Average ( Data 2::Value )

to get the average value of the company's data for the last three years.

Edited by comment
  • Like 1

This topic is 3505 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.