Skip to main content

I've set up a few custom formula fields in Opportunities to determine weighted averages for bill rate, wage rate, etc. when looking at multiple services from our different brands.  I get #error in my reports when the denominator sums to zero. I've seen this answered a few times when the denominator is only one field value, but my denominator is a sum of 3 fields. How can I get the formula to return either 0 or null when dividing by 0 instead of #error. Here is an example formula I wrote for our Weighted Average Bill Rate field. 

 

(( Protos_Bill_Rate__c * Protos_Opp_Est_Hours__c ) + ( SRI_Bill_Rate__c * SRI_Opp_Est_Hours__c ) + ( Mulligan_Bill_Rate__c * Mulligan_Opp_Est_Hours__c ))/( Protos_Opp_Est_Hours__c + SRI_Opp_Est_Hours__c + Mulligan_Opp_Est_Hours__c)

 

How can I get it to return 0 or null when the demonator ( Protos_Opp_Est_Hours__c + SRI_Opp_Est_Hours__c + Mulligan_Opp_Est_Hours__c) sums up to 0. 

 

#Formula Field  #Formula  #Formulas  #Sales Cloud

7 respuestas
  1. 29 jul 2021, 8:57 p.m.

    PS.  Also, whevener you're doing math make sure you select "Treat blank fields as Zeros" instead of Blanks, otherwise you'll need a similar "Exit" on each field 

Cargando
0/9000