You need to sign in to do that
Don't have an account?
Sheena Querido
Formula referencing another formula - too many characters?
I tried creating a formula, but I got an error message that said there were too many characters in my formula. Any ideas on how to shorten the formula is much appreciated!
Error: Invalid Data.
Review all error messages below to correct your data.
Compiled formula is too big to execute (9,526 characters). Maximum size is 5,000 characters (Related field: Formula)
Where the field Cost__c is another formula:
Error: Invalid Data.
Review all error messages below to correct your data.
Compiled formula is too big to execute (9,526 characters). Maximum size is 5,000 characters (Related field: Formula)
IF(ISPICKVAL(Frequency_of_Service__c, "One-time"), ABS((Cost__c * Probability) / 1), IF(ISPICKVAL(Frequency_of_Service__c, "Yearly"), ABS((Cost__c * Probability) / 1), IF(ISPICKVAL(Frequency_of_Service__c, "Twice Yearly"), ABS((Cost__c * Probability) / 2), IF(ISPICKVAL(Frequency_of_Service__c, "Quarterly"), ABS((Cost__c * Probability) / 4), IF(ISPICKVAL(Frequency_of_Service__c, "Monthly"), ABS((Cost__c * Probability) / 12), IF(ISPICKVAL(Frequency_of_Service__c, "Twice Monthly"), ABS((Cost__c * Probability) / 12), IF(ISPICKVAL(Frequency_of_Service__c, "Weekly"), ABS((Cost__c * Probability) / 12), IF(ISPICKVAL(Frequency_of_Service__c, "Twice Weekly"), ABS((Cost__c * Probability) / 12), IF(ISPICKVAL(Frequency_of_Service__c, "Daily"), ABS((Cost__c * Probability) / 12), 0 )))))))))
Where the field Cost__c is another formula:
IF(ISPICKVAL(Margin__c , "60"), ABS((Amount -(0.60 * Amount))), IF(ISPICKVAL(Margin__c , "50"), ABS((Amount -(0.50 * Amount))), IF(ISPICKVAL(Margin__c , "40"), ABS(( Amount -(0.40 * Amount))), IF(ISPICKVAL(Margin__c , "45"), ABS((Amount -(0.45 * Amount))), IF(ISPICKVAL(Margin__c , "35"), ABS((Amount -(0.35 * Amount))), IF(ISPICKVAL(Margin__c , "30"), ABS((Amount -(0.30 * Amount))), 0 ))))))
IF (CASE(TEXT(Frequency_of_Service__c), "One-time",1,"Yearly",1,"Twice Yearly",2,"Quarterly",4,"Monthly",12,"Twice Monthly",12,"Weekly",12,"Twice Weekly",12,"Daily",12,0) > 0, ABS((Cost__c * Probability) / CASE(TEXT(Frequency_of_Service__c), "One-time",1,"Yearly",1,"Twice Yearly",2,"Quarterly",4,"Monthly",12,"Twice Monthly",12,"Weekly",12,"Twice Weekly",12,"Daily",12,1)),0)
Notepad++ for the open/closed parenthesis :
Regards
Alain
All Answers
IF(VALUE(TEXT(Margin__c)) > 0, ABS(Amount -(VALUE(TEXT(Margin__c))/100 * Amount)),0)
IF (CASE(TEXT(Frequency_of_Service__c), "One-time",1,"Yearly",1,"Twice Yearly",2,"Quarterly",4,...,0) > 0,
ABS((Cost__c * Probability) / CASE(TEXT(Frequency_of_Service__c), "One-time",1,"Yearly",1,"Twice Yearly",2,"Quarterly",4,...,1),0)
IF (CASE(TEXT(Frequency_of_Service__c), "One-time",1,"Yearly",1,"Twice Yearly",2,"Quarterly",4,"Monthly",12,"Twice Monthly",12,"Weekly",12,"Twice Weekly",12,"Daily",12,0) > 0, ABS((Cost__c * Probability) / CASE(TEXT(Frequency_of_Service__c), "One-time",1,"Yearly",1,"Twice Yearly",2,"Quarterly",4,"Monthly",12,"Twice Monthly",12,"Weekly",12,"Twice Weekly",12,"Daily",12,1)),0)
Notepad++ for the open/closed parenthesis :
Regards
Alain