We have a formula field in a custom object that does not calculate properly. Although the value of the field in the if condition is not null, the result is always zero. The formula is:
if(field1__c!=null,field2__c - field3__c,0)
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
try changing it to
IF(ISBLANK(field1__c), 0 , field2__c - field3__c)
its always better to use the inbuilt formula functions..
you can refer this link to understand the difference between ISNULL and ISBLANK functions