Need help creating a mathematical formula using a picklist field - Answers - Salesforce Trailblazer Community
Ask Search:
Sharon GraybillSharon Graybill 

Need help creating a mathematical formula using a picklist field

Total Contract Value / Contract Term = Annual Contract Value where the value for Contract Term  has been selected from a picklist.

Thanks,
Sharon
Best Answer chosen by Sharon Graybill
Deepak AnandDeepak Anand
Ah! Great. So the Formula will be = 
Total_Contract_Value__c / (VALUE(TEXT(Contract_Term__c)) * 12)

All Answers

Deepak AnandDeepak Anand
What are the different options for the Picklist field - Contract Term ?
Sharon GraybillSharon Graybill
1, 2, 3, 4 or 5
Pattie HeintzPattie Heintz
Contract_Value__c / Value(Text(Contract_Term__c))

You may need to adjust the field names to match your field API names, but you can take a picklist value with "Text(picklist_field__c)" and convert that 'text' to a number with "Value()".

As long as your picklist results are straight numbers, this should work.  If your picklist field has non-numeric entries (like, "3 years" instead of just "3") then you will have to add some more logic.  If that is the case, post your picklist choices and the experts here can spin out a formula for ya!

Deepak AnandDeepak Anand
Ah! Great. So the Formula will be = 
Total_Contract_Value__c / (VALUE(TEXT(Contract_Term__c)) * 12)
This was selected as the best answer
Sharon GraybillSharon Graybill
Thanks, so  much!