Skip to main content
I have these fields on a cost record in Salesforce

 

material costs 85.00

 

labor costs 42.32

 

Hours 0

 

I have this formula that uses these fields

 

(Material_Cost__c * 0.07) + (Labor_Costs__c * Hours__c)

 

What I need this to do is if there is a 0 in the hour's field then I need it to not add the value in the Labor cost field. If there is a value in the hour's field then I need it to multiply that number by the value in the labor costs field and add that to the sum of the Material cost * 0.07, The way its written its adding the number in the labor cost field to the value of material costs * 0.07 instead of multiplying the number in the labor cost field  by 0 ( which would be 0) 

 

 
13 answers
  1. Aug 29, 2018, 10:08 PM
    Material_Cost__c = Currency(6, 2)

     

    Labor_Costs__c = Number(16, 2)

     

    Hours__c = Number(18, 0)

     

     
0/9000