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
max4904max4904 

Nested IF statement

I am trying to use a nested IF statement to evaluate two other fields and give a result. Each of the other fields give a results of "Low", "Medium" and "High".  There are nine possible combinations to evaluate. I am trying to evaluate each combination and give a percentage result. When I try to check the syntax of this formula I keep getting error messages telling me I have a Syntax Error that I am missing or that the compiled formula is too large.

 

Here's my current forumula:

 

IF(AND(Field_A="Low",Field_B="Low"), 0.15,
IF(AND(Field_A="Medium",Field_B="Low"), 0.25,
IF(AND(Field_A="High",Field_B="Low"), 0.30, null)))

 

I get the "Compiled formula is too big to execute" error when I try to check the syntax. Is there something wrong with my syntax or is there a way to use the CASE statement or any other approach to make this work?

Steve :-/Steve :-/
Are any of the fields in your formula also Formula Fields?  Are there any other formulas on this Object?  I'm not 100% sure but I think the Complied Formula size is cumulative for the entire Object, not just each individual formula.
max4904max4904

Yes. Both the fields evaluated are formula fields. That makes 5 total formula fields on this Object.

 

If I've hit the size limit, what other approach could I use to program the same logic and get the same result?

 

Thanks,
Max.