0

Assuming I have these formula fields returning currency values:

formula_field1__c : (currency1__c * currency2__c)
formula_field2__c : (currency3__c * currency2__c)

*Note that currency3__c is also a formula field:

currency3__c: (currency4__c - currency1__c)

Now, this is what I am trying to accomplish:

Every time a picklist value is equal to 'Value1', it must return the value of formula_field1__c, and Every time a picklist value is equal to 'Value2', it must return the value of formula_field2__c.

I created another formula field, formula_field3__c :

IF(ISPICKVAL(picklist__c,'Value1'),formula_field1__c,null) +
IF(ISPICKVAL(picklist__c,'Value2'),formula_field2__c,null) 

I don't encounter any errors, but every time I save a record, formula_field3__c doesn't have any value.

1

Formula_Field3__c should probably read:

CASE(Picklist__c, 
    'Value1', Formula_Field1__c, 
    'Value2', Formula_Field2__c, 
    null)

The problem with your formula is that if you use "treat blanks as blanks", then you end up with something like "null + 0", which doesn't make any sense.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.