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
lakshman.mattilakshman.matti 

Fiscal year calculations.

I created a field called  Revenue on account object.i want to calculate Fiscal Year to Date (YTD) revenue based on amount field from opportunity object on account object.
Can some body tel me the approach.
Ashish_SFDCAshish_SFDC
Hi , 


You can use a rollup summary field on the Account Object that Adds up all the Opportunities - Revenue Field and Display on Account Object. 

IN the criteria you can mention the dates for your fiscal year - this wont be applicable for your next year - you have to change the date manually. 

 User-added image


Vote for the Idea: Roll-Up Summary Fields: Formulas Rather than Static Criteria

https://success.salesforce.com/ideaView?id=08730000000BrUAAA0


Also See some similar links, 

Date LIterals : http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm

Roll-up Summary Field: Opportunity Amount Sum on Account: https://success.salesforce.com/answers?id=90630000000gslUAAQ

Creating a Roll-Up Summary Field using "Smart Date" Filters: https://success.salesforce.com/answers?id=90630000000gsl7AAA


Regards,
Ashish
lakshman.mattilakshman.matti
Hi Ashish,

Thanks for your reply.there is concern when entering date literals in criteria.we cann't use date laterals in criteria.
Can u please explain in detail. that appraoch u suggested here..https://success.salesforce.com/answers?id=90630000000gsl7AAA

Thanks
Lakshman
Ashish_SFDCAshish_SFDC

Hi Lakshman, 


Seems like the Date Literals are not supported in Roll up Summary fields. 

You have to manually put the Dates >= 1/1/2014 and next criteria <= 31/12/2014 for this year. 

https://success.salesforce.com/answers?id=90630000000h2erAAA


Regards,

Ashish

lakshman.mattilakshman.matti
Hi Ashish,

If i keep the values manually it will wont work in future..


Regards
Lakshman