I am trying to capture the max number value of 3 custom fields, then output the field name/label of the winner. What's the best way to do this?

Right now I got:

Max(Field A, Field B, Field C) and its correctly show me the highest number between the 3, BUT, I want to show the field name/label, instead of the max numerical value. Is this possible with some manipulation, if so, how?


If (Max(Field A, Field B, Field C)= Field A, “Field A”, 
If(Max(Field A, Field B, Field C)=Field B, “Field B”, 
If(Max(Field A, Field B, Field C)=Field C, “Field C”, No Value Set)
  • To include more information, do not use comments, but edit the existing question.
    – sfdcfox
    Apr 22 '18 at 3:49

Yes this is possible with a formula you just need to make sure Text is returned with your value - For example - If you wish to add your own label to each Max value out of Three custom fields - you can use the following formula :

IF(MAX(Field_A__c,Field_B__c,Field_C__c)= Field_A__c,"Value A Is the Max = "+ TEXT(Field_A__c),$Label.OtherValue)
  • You can also add custom label as shown $Label.OtherValue

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.