0

Currently I have a formula consisting of various fields where each of the field itself is a formula. This results in a formula is too big to compile error. I am wondering if there are any ways optimize the formula to avoid such error.

The current formula takes the score of all my various components and divides it by the count of the number of components used if they are not blank.

This is my overall score formula: enter image description here

This is my communication score formula:

enter image description here

4
  • You can try switching CASE with IF
    – Damecek
    Commented Sep 5, 2022 at 9:29
  • Or if the fields are picklist, the value of the option could be 1 or 0, and then you could try to add them, but not sure if won't just get '100010'.
    – Damecek
    Commented Sep 5, 2022 at 9:31
  • What are the compiled costs of each formula function? is a good reference.
    – Derek F
    Commented Sep 5, 2022 at 11:59
  • 1
    This is essentially a duplicate of your question here: salesforce.stackexchange.com/questions/384455/…. You might be able to use "1" and "0" for your picklist API values and thus use VALUE function instead of IFs. But given the complexity of your calculations, you may have to replace some of your formula fields with number fields calculated by Flow or Apex. Commented Sep 5, 2022 at 16:59

0

You must log in to answer this question.

Browse other questions tagged .