Jump to content

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

Recommended Posts

Posted

Maybe I'm tired, but I cannot find a solution : I have a database, let's say DB1, with records. For each record, the creation date is automatically introduced, and the year+month of creation calculated. I another database, DB2, I create some record, 1 for each month of each year. A link year+month links the two DB togheter.

It's easy to calculate the number of records for each month from DB1 in DB2, by NUMBER(dataDB1), for instance. Let's call this field numberDB1. Now, I would like to calculate a cumulative field (call cum), wich should show, for each month, the total of record in DB1 up to the concerned month. Example : suppose that I have 10 records in DB1 for the 1st month, 14 for the 2nd and 16 for the 3th. In DB2, the field numberDB1 will show the number 10 for the 1st record, 14 for the 2nd and 16 for the 3th. I would like that my cumulative field, cum, shows 10 for the first record, 24 for the 2d, 40 for the 3rth, etc...

I have tried by creating a counter, a link with the previous record (counter-1), and a field saying : "if the counter=1, take numberDB1, else take previous record::cum+numberDB1". It doesn't work, FMP saying that I create a circular reference... Any idea ? I would like to not run a script.

confused.gif

Posted

Try creating a Summary field in DB2, defined as the total of your "NUMBER(dataDB1)" field in the same file. Make sure it's a running total.

GI

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