You need to sign in to do that
Don't have an account?
erin ryan 8
Using Numbers, Currency, and Percentages in Formulas
I feel the directions aren't clear. Is the entire formula below belong in the interest rate field? or should there be two formula fields. Thanks
IF(Principal__c < 10000, 0.02,
IF(Principal__c >= 10000 &&
Principal__c < 100000, 0.03, 0.04))
Principal__c * EXP( Interest_Rate__c * (YEAR(TODAY()) - VALUE(YearStarted)))
)
IF(Principal__c < 10000, 0.02,
IF(Principal__c >= 10000 &&
Principal__c < 100000, 0.03, 0.04))
Principal__c * EXP( Interest_Rate__c * (YEAR(TODAY()) - VALUE(YearStarted)))
)
IF( Principal__c < 10000, 0.02,
IF( ( Principal__c >= 10000 &&
Principal__c < 100000 ), 0.03, 0.04 )
) * EXP( Interest_Rate__c * ( YEAR(TODAY() ) - VALUE(YearStarted) ) )
For the interest rate, insert the field we made earlier, Interest_Rate__c. To find the number of years that the account has been open, subtract YearStarted, the year that the account was opened, from TODAY(), a built-in function that returns the current day. Because YearStarted is a Text value, you first have to convert it to a Number using VALUE(), which takes a Text string and returns a Number. We also use the function YEAR(), which pulls just the year from a Date, in this case the current date returned by TODAY().
You can do it all in one formula if you like, but the instructions suggest two formula fields. One as field it would be
If you decide to do it like we outline in Trailhead, you'll need a new formula field for this part:
Principal__c * EXP(Interest_Rate__c * (YEAR(TODAY()) - VALUE(YearStarted)))
I will work with the writer to make this more clear. Thanks for the feedback, and thanks James for looping us in!
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/api/sforce_api_objects_account.htm
Even if I create a field with the API name of YearStarted, the formula still throws an error saying that YearStarted does not exist.