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
Aruna Dhavaleswarapu 4Aruna Dhavaleswarapu 4 

For the given formula in the formula field ,how can we write more effectively to avoid error "compiled formula is too big to execute"

     IF(End_Date_of_Spot_Business_or_Project__c <= DATE(YEAR(CloseDate),9,30),
       ((DATE(YEAR(CloseDate),9,30) - CloseDate) / (End_Date_of_Spot_Business_or_Project__c - CloseDate)) *  Cabot_Incremental_Volume_Annualized_Y1__c),
    IF(End_Date_of_Spot_Business_or_Project__c <= DATE(YEAR(CloseDate)+1,9,30),
       ((DATE(YEAR(CloseDate)+1,9,30) - CloseDate) / (End_Date_of_Spot_Business_or_Project__c - CloseDate)) *  Cabot_Incremental_Volume_Annualized_Y1__c)), 
Cabot_Incremental_Volume_Annualized_Y1__c * Fiscal_Year_Factor__c)
Jainam ContractorJainam Contractor
Hi Aruna,

Can you please let me know what you are trying to build using this formula. Something like the use case for the same.

Jainam Contractor.
Aruna Dhavaleswarapu 4Aruna Dhavaleswarapu 4

As per business requirement, we are proportionating the balance of day between close date to fiscal year end against close date to the end of spot business date to calculate spot volume for fiscal year 1.  However, if the end of spot business date is within fiscal year end, 100% will be recognized. The fiscal year is calculated based on close date, as our fiscal starts from October which drives me to a situation that I look for the month of close date and calculate the formula accordingly.

Thank you Jainam