Formula field for Calculating contract value less than 12 months - Answers - Salesforce Trailblazer Community
ShowAll Questionssorted byDate Posted Karin McWilliams

# Formula field for Calculating contract value less than 12 months

Hi All -

We went from having 12 month contracts to 3 and 6 month contracts and my calculation was based on 12 months only.
How can I calculate annual contract value for only 3 or 6 months along with the 12 month contract?

Below is my original formula field:
Contract_Total_Value__c  / Contract_Term_Number__c * 12 Best Answer chosen by Karin McWilliams Karin McWilliams
OK I think I've got it:
IF( Contract_Term_Number__c = 3, Contract_Total_Value__c  / Contract_Term_Number__c * 3,
IF( Contract_Term_Number__c = 6, Contract_Total_Value__c  / Contract_Term_Number__c * 6,
IF( Contract_Term_Number__c = 12, Contract_Total_Value__c  / Contract_Term_Number__c * 12, NULL))) Ahilesh Ragavan
Hi Karin,

Try like these:

3 Month Contract -
`Contract_Total_Value__c  / Contract_Term_Number__c * 4`

6 Month Contract -
`Contract_Total_Value__c  / Contract_Term_Number__c * 6` Karin McWilliams
Thanks for the quick answer, Ahilesh!
I need the formula to calculate into one field so I need an IF statement. Doy ou know how I would do this? Karin McWilliams
Like this?
IF( Contract_Term_Number__c = 3, Contract_Total_Value__c  / Contract_Term_Number__c * 3)
IF( Contract_Term_Number__c = 6, Contract_Total_Value__c  / Contract_Term_Number__c * 6)
IF( Contract_Term_Number__c = 12, Contract_Total_Value__c  / Contract_Term_Number__c * 12), NULL Karin McWilliams
OK I think I've got it:
IF( Contract_Term_Number__c = 3, Contract_Total_Value__c  / Contract_Term_Number__c * 3,
IF( Contract_Term_Number__c = 6, Contract_Total_Value__c  / Contract_Term_Number__c * 6,
IF( Contract_Term_Number__c = 12, Contract_Total_Value__c  / Contract_Term_Number__c * 12, NULL)))
This was selected as the best answer Narender Singh
Why not simply like this?
`Contract_Total_Value__c  / Contract_Term_Number__c * Contract_Term_Number__c` Steve Molis
+++  I would go with @NarenderSingh 's soluation (it's MUCH cleaner)