You need to sign in to do that
Don't have an account?
Matt Czugala
Formula in Opportunity Field to calc YTD sales
In Opportunity, we track monthly sales. So there is a Jan_Sales, Feb_Sales, etc. for each month.
I want to create a YTD_Sales field so that each month it adds the next month into is.
I figured this was doable with a case statement, but I keep running into errors with formula being too long.
Any suggestions? Thank you
Case(month(today),1,jansales__c,2,Jansales__c+febsales__c,3,Jansales__c+febsales__c+marsales__c,....,11,jansales__c+febsales__c+marchsales__c+...Novsales__c,jansales__c+febsales__+...decsales__c)
Please let me know if this generates more errors or mark this as best answer as it iwll help others.
Make sure you declare return value for this fomula as currency.
Thanks,
There are some tricks and twists to avoid huge formulae like this, probably -in this case - involving Workflow to copy values from long formula fields into concrete value fields, and then using those in wider formulae going forward.
This of course might not be the case though, and Jan_Sales might just be a number field for you! :)