function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

formula to count multi picklist values?

Does anyone know of a formula that will count the number of value selected in a multi-picklist?  I want to use it in a calculation to come up with an average. Thanks.

If you dont have too many options in your multi-picklist, try this:

Create a new formula field
Set the Formula Return Type to Number
Set Decimal Places to 0

For the formula value, use:

IF(INCLUDES(MultiPicklist__c,'Option A'),1,0) + IF(INCLUDES(MultiPicklist__c,'Option B'),1,0) + IF(INCLUDES(MultiPicklist__c,'Option C'),1,0) + IF(INCLUDES(MultiPicklist__c,'Option D'),1,0) + IF(INCLUDES(MultiPicklist__c,'Option E'),1,0) + IF(INCLUDES(MultiPicklist__c,'Option F'),1,0)


Where MultiPicklist__c is your multi-picklist field. Add all the options in your picklist to the formula.


Good Luck!


Please try the following , I think it should work.

if(  ISPICKVAL(picklist_field, "one"),  if(ISPICKVAL(picklist_field, "two"), if(ISPICKVAL(picklist_field, "three"),3,2),2),1);