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
MarioCMarioC 

Newbie Needs Help With Basic Formula

Hi all...  this is my first question I am posting here.  I am new to SFDC and I hope this is a quick one.  I have a formula that I need to figure out.  I want to figure out this formula   = [(end of year date) - (expected close date)] * (Revenue Annualized/366)
So this pretty much calculates the amount of days left in the year and multiplies it by the daily Revenue...
 
I am sure this will be a quick one... I appreciate everyone's assistance.
 
Mario
Best Answer chosen by Admin (Salesforce Developers) 
Gemini@WorkGemini@Work
Formula for "End of Year" date: 
      DATE (YEAR (TODAY() ), 12, 31)
 
 
Therefore, to calculate the # of days between your opportunity close date and the end of year date:
      ROUND ( (DATE (YEAR (TODAY() ), 12, 31) - CloseDate
 
 
So your complete formula is:
      (ROUND ( (DATE (YEAR (TODAY() ), 12, 31) - CloseDate) * (Revenue Annualized / 365)
 
 
(Note sure how you define revenue annualized -- is it a custom field, a constant value, or a variable that you can calculate based on other fields in the Opportunity object -- but hopefully this gets you closer to objective.

All Answers

JakesterJakester
What's your question? Sounds like you have the formula already figured out.
MarioCMarioC
I guess I am looking for the syntax for the first part of the equation.  The second part is fine- but the first one isn't straight forward to me....
JakesterJakester
It seems like you have a good start there - why don't you try it and report back if you have trouble so that people can help you with a specific problem rather than just write the formula for you?
Gemini@WorkGemini@Work
Formula for "End of Year" date: 
      DATE (YEAR (TODAY() ), 12, 31)
 
 
Therefore, to calculate the # of days between your opportunity close date and the end of year date:
      ROUND ( (DATE (YEAR (TODAY() ), 12, 31) - CloseDate
 
 
So your complete formula is:
      (ROUND ( (DATE (YEAR (TODAY() ), 12, 31) - CloseDate) * (Revenue Annualized / 365)
 
 
(Note sure how you define revenue annualized -- is it a custom field, a constant value, or a variable that you can calculate based on other fields in the Opportunity object -- but hopefully this gets you closer to objective.
This was selected as the best answer
JakesterJakester
Well done JP! You really went above-and-beyond there! :-)