function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Philipp MathisPhilipp Mathis 

custom formula to calculate amount field and or new custom field

Hello Community

I have several questions regarding custom formula to calculate in a certain field.

1. is it possible to change the "formula" behind the standard field amount?
if yes, I'd like to have this field calculate out of two other (custom fields) and not just sum up everything to the amount.

2. I would like to have another custom field on the opportunity (or should I work with products?) that will give me the quota until year end of the total "deal size". usually a deal goes over 3 years period. E.g. when a opportunity is closed end of July 2017 I only want to show me the quote of the total deal size until 31.12.2017. So the formula should take the value of the total deal size from another field and then do the calulcation with support of the information (standard field close date, already existing on the opportunity) and everytime calculate until the end of the remaining claendar year. Then the formula should also add the value of another field on top of this amount.
So Formula should calculate: quote by the end of current year of amount a from custom field a and add the value of custom field b on top.
->how would such a formula looks like?

3. how does a basic summarize formula of two value from two fields sum up into a third field looks like? e.g. have custom field A w value x, custom field B w value y and I'd like to have in custom field C the calculated value from X+Y.

many thanks,

Philipp
LBKLBK
Hi Philipp,

Here are my answers.

1. is it possible to change the "formula" behind the standard field amount?
if yes, I'd like to have this field calculate out of two other (custom fields) and not just sum up everything to the amount.

LBK: I don't think so. I advise you to have another custom amount field.
Probably a formula field, if you are calculating it from within the same object.
If it has to be from a Lookup relationship or a Master-Detail relationship, you need a Currency / Decimal field which can be populated using a Trigger or Rollup Summary respectively.


2. I would like to have another custom field on the opportunity (or should I work with products?) that will give me the quota until year end of the total "deal size". usually a deal goes over 3 years period. E.g. when a opportunity is closed end of July 2017 I only want to show me the quote of the total deal size until 31.12.2017. So the formula should take the value of the total deal size from another field and then do the calulcation with support of the information (standard field close date, already existing on the opportunity) and everytime calculate until the end of the remaining claendar year. Then the formula should also add the value of another field on top of this amount.
So Formula should calculate: quote by the end of current year of amount a from custom field a and add the value of custom field b on top.
->how would such a formula looks like?

LBK: Need little more info. Will you be dividing the "Deal size" by number of months and multiply it by number of months till end of the year (31.12.2017)?

3. how does a basic summarize formula of two value from two fields sum up into a third field looks like? e.g. have custom field A w value x, custom field B w value y and I'd like to have in custom field C the calculated value from X+Y.

LBK: It would be like Custom_Field_A__c + Custom_Field_B__c

Let me know how it goes.
 
Philipp MathisPhilipp Mathis
thanks for your reply.
so for 
1. what is the now the standard formular behind the standard amount field? it is only linked to the amounts entered under products right? or you could just simply enter an amount yourself but there is no other link to other fields?

2. the accruate it would be to dividing the deal size by numbers of days. E.g. dealsize 1k and duration 3 years. close date of the deal is 31.7.17 so it should divide t the deal size by numbers of actual days from 31.7.17 until those 3 years. and then calculate the value of the remaining year 2017 with it. so that I have a precised quota of the deal value from 31.7.17-31.12.17 and it should be a generic formula so I can use it every year and with every possible close date etc. thats just for illustration purposes.