+ Start a Discussion
Haseeb Ahmad 9Haseeb Ahmad 9 

Error: Compiled formula is too big to execute (6,985 characters). Maximum size is 5,000 characters

Hi everyone,

I am trying to add showing in this screenshot but I am getting this  Error: Compiled formula is too big to execute (6,985 characters). Maximum size is 5,000 characters.

User-added image

Both of these fields which I am trying to add are also formula fields (number). 

Account_Impact_Score__c
Risk_Impact_Score__c

Is there a way to fix this issue? Thank you for your help.
Best Answer chosen by Haseeb Ahmad 9
Haseeb Ahmad 9Haseeb Ahmad 9
I am able to resolve by reducing the 2nd formula.
 
CASE(Status__c, 'Open',
CASE(Risk_Impact__c,'Churn',25,'Client Health',10,'Contractual Erosion',20,'Payment Uncertainty',10,'Referenceability',5,'Go Live Delayed',10,
'Will Not Go Live Phase 1',25,'Will Not Go Live Future Phase',20,'Scope',5,'Expansion',10,'Sales/Deal Blocker',10,0),
'Will Not Resolve',
CASE(Risk_Impact__c,'Churn',25,'Client Health',10,'Contractual Erosion',20,'Payment Uncertainty',10,'Go Live Delayed',10,
'Will Not Go Live Phase 1',25,'Will Not Go Live Future Phase',20,'Scope',5,'Expansion',10,'Sales/Deal Blocker',10,0),
'Resolved',
CASE(Risk_Impact__c,'Churn',15,'Client Health',5,'Contractual Erosion',10,'Payment Uncertainty',5,'Go Live Delayed',5,
'Will Not Go Live Phase 1',10,'Will Not Go Live Future Phase',15,'Expansion',5,'Sales/Deal Blocker',5,0),0)
IF(ISPICKVAL( Workaround_exists__c, 'Yes'),0,10)
+
CASE( Is_workaround_acceptable__c, 'Yes - short term',5, 'No',10,0)

 

All Answers

RituSharmaRituSharma
It considers even the dependent formulas i.e. if Account_Impact_Score__c and Risk_Impact_Score__c are formula fields then even their formula lenght will be considered. Same way if they are further using formula fields then they will be considered too.
Haseeb Ahmad 9Haseeb Ahmad 9
Hi Ritu,

Thank you for your reply.

Account_Impact_Score__c:  
Account__r.Account_Impact_Score__c

Risk_Impact_Score__c: 
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Churn')),25,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Churn')),25,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Churn')),15,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Client Health')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Client Health')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Client Health')),5,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Contractual Erosion')),20,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Contractual Erosion')),20,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Contractual Erosion')),10,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Payment Uncertainty')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Payment Uncertainty')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Payment Uncertainty')),5,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Referenceability')),5,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Go Live Delayed')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Go Live Delayed')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Go Live Delayed')),5,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Will Not Go Live Phase 1')),25,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Will Not Go Live Phase 1')),25,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Will Not Go Live Phase 1')),10,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Will Not Go Live Future Phase')),20,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Will Not Go Live Future Phase')),20,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Will Not Go Live Future Phase')),15,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Scope')),5,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Scope')),5,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Scope')),0,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Expansion')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Expansion')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Expansion')),5,
IF(AND( ISPICKVAL(Status__c, 'Open'),
ISPICKVAL(Risk_Impact__c, 'Sales/Deal Blocker')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Will Not Resolve'),
ISPICKVAL(Risk_Impact__c, 'Sales/Deal Blocker')),10,
IF(AND(ISPICKVAL( Resolution_Status__c, 'Resolved'),
ISPICKVAL(Risk_Impact__c, 'Sales/Deal Blocker')),5,
0)))))))))))))))))))))))))))))))
+
IF(ISPICKVAL( Workaround_exists__c, 'Yes'),0,10)
+
IF(ISPICKVAL( Is_workaround_acceptable__c, 'Yes - short term'),5,
IF(ISPICKVAL( Is_workaround_acceptable__c, 'No'),10,0))

Here are the formulas on those 2 fields, which I am trying to add here. 

Do you think you can able to help me reduce this limit? thank you for your help. 
Haseeb Ahmad 9Haseeb Ahmad 9
I am able to resolve by reducing the 2nd formula.
 
CASE(Status__c, 'Open',
CASE(Risk_Impact__c,'Churn',25,'Client Health',10,'Contractual Erosion',20,'Payment Uncertainty',10,'Referenceability',5,'Go Live Delayed',10,
'Will Not Go Live Phase 1',25,'Will Not Go Live Future Phase',20,'Scope',5,'Expansion',10,'Sales/Deal Blocker',10,0),
'Will Not Resolve',
CASE(Risk_Impact__c,'Churn',25,'Client Health',10,'Contractual Erosion',20,'Payment Uncertainty',10,'Go Live Delayed',10,
'Will Not Go Live Phase 1',25,'Will Not Go Live Future Phase',20,'Scope',5,'Expansion',10,'Sales/Deal Blocker',10,0),
'Resolved',
CASE(Risk_Impact__c,'Churn',15,'Client Health',5,'Contractual Erosion',10,'Payment Uncertainty',5,'Go Live Delayed',5,
'Will Not Go Live Phase 1',10,'Will Not Go Live Future Phase',15,'Expansion',5,'Sales/Deal Blocker',5,0),0)
IF(ISPICKVAL( Workaround_exists__c, 'Yes'),0,10)
+
CASE( Is_workaround_acceptable__c, 'Yes - short term',5, 'No',10,0)

 
This was selected as the best answer