Can I return two different data types in formula field based on some criteria?

Say I have a Formula1__c field with a percent return type, and Roll_up Summary__c field that counts all detail records wherein Picklist__c value = 'A'.

There's a requirement that if Roll_up Summary__c > 0, a formula field with text return type named Result__c must be equal to A, while if Roll_up Summary__c = 0, Result__c must be equal to Formula1__c.

Please bear with me, and thanks in advance.

  • 2
    Why not return a text in both scenarios?
    – Raul
    Commented Mar 9, 2018 at 10:40

1 Answer 1


Formula should always return selected type.

In your case I would either: Create formula and depending on conditions return parsed values (there are functions for that eg TEXT() VALUE()) or create two formula fields each working with desired requirements.

  • i've tried TEXT(Formula1__c) but it just returns zero. Would not it get the exact value of Formula__c? Say its value is 100%. Isn't it possible to get it in that state?
    – Gaynerys
    Commented Mar 9, 2018 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .