You need to sign in to do that
Don't have an account?
Timesync0
Formula to calculate payment amount based on date
I have the need to create a formula field that returns an amount based on the following logic:
1. There is an initial one-time payment amount. That amount (#1) is annotated manually in a field
2. That payment will be made on the Friday following record creation.
3. Once that payment is made, there is a seperate payment that will be made bi-weekly. That amount (#2) is also annotated in a field
4. I need to have the calculated field populated with the appropriate amount. If it is before the Friday followiing the account creation, then the amount will be #1. If the date is past the first Friday post account creattion, then the amount will be #2.
I do not think I can use the "IF" function as I believe that only returns a non-numeric. Is this something for the "CASE" function?
Help??
1. There is an initial one-time payment amount. That amount (#1) is annotated manually in a field
2. That payment will be made on the Friday following record creation.
3. Once that payment is made, there is a seperate payment that will be made bi-weekly. That amount (#2) is also annotated in a field
4. I need to have the calculated field populated with the appropriate amount. If it is before the Friday followiing the account creation, then the amount will be #1. If the date is past the first Friday post account creattion, then the amount will be #2.
I do not think I can use the "IF" function as I believe that only returns a non-numeric. Is this something for the "CASE" function?
Help??
IF(
TODAY()-
(CASE(MOD(DATEVALUE(CreatedDate) - DATE(1900, 1, 7), 7),
0,DATEVALUE(CreatedDate)+6,
1,DATEVALUE(CreatedDate)+5,
2,DATEVALUE(CreatedDate)+4,
3,DATEVALUE(CreatedDate)+3,
4,DATEVALUE(CreatedDate)+2,
5,DATEVALUE(CreatedDate)+1,
6,DATEVALUE(CreatedDate)+7,
DATE(1900,12,31)))
<0, Amount1__c , Amount2__c ))