Salesforce and other SMB Solutions are coming soon. ×

Calculating Period

Recommended Posts

Hi all;

Hoping someone can help, I am trying to come up with a way to calculate a period, I have a db with the following fields;

Member_since [date],

Price [number]

Amount_paid [number]

No_Paid [number] = Amount_Paid / Price

Month_Paying [date]

Period_Paid [date]

Paid_Thru [date]

I need to use the â€œdateâ€ from â€œmember_sinceâ€ and â€œnumber_paidâ€, the use them to calculate the â€œperiod_Paidâ€ and the â€œpaid_Thruâ€, the â€œdateâ€ can never change, the only part that changes if the month and the year.

Thanks for help.

rudman88@hotmail.com

Share on other sites

Hello RudMan,

Assuming that what you are saying is that payment is always made in whole months (so the value produced by the No_Paid calculation will always be an integer), you could use a formula along the lines of:

Date(Month(Member_since) + No_Paid, Day(Member_since), Year(Member_since))

Make sure that the result type of the calculation is set to date and you should get the result you are after straight off.

The beauty of this approach is that it uses FileMaker's built-in date engine to do all the hard work of juggling the months and years to come up with the right answer.

Share on other sites

Thanks Ray.

It works. Greate.

RudMan

Share on other sites

Hi all;

I created the following formula based on the previous post.

"Date(Month(Last(Next_Paid_From)) + Last(Payment_Member_ID::Period_Paid), Day(Last(Member_Since)) - 1, Year(Last(Payment_Member_ID::Payment_Month)))"

The problem I now have is that if the field in the â€œlastâ€ is empty the calculation is using the "first record". If there a way I can tell the calculation that if the particular field is empty to calculate using information from the previous record.

RudMan88

• Images

• By Soliant Consulting,
• By Soliant Consulting,
• By Soliant Consulting,
• Forum Statistics

• Total Topics
33.7k
• Total Posts
141.6k
×
×
• Create New...