When you create a Roll-Up Summary field in Salesforce and base its filter criteria on a picklist field, the filter criteria cannot exceed 255 characters. This becomes a problem when the picklist has many values you need to filter on.
For example, suppose you have a Country picklist field on the Opportunity object with 196 values, and you want to create a Roll-Up Summary field on Account that counts Opportunities from 40 specific countries. Listing 40 comma-separated country names in the Filter Criteria field can easily exceed the 255-character limit. It is also risky to edit a filter value with that many comma-separated entries, since you can accidentally remove or overwrite another value by mistake while modifying it.
This article explains how to work around the 255-character filter limit on a Salesforce Roll-Up Summary field when the filter needs to reference many picklist values. The workaround is to create a formula checkbox field on the child object that evaluates the picklist values using a CASE function, then filter the Roll-Up Summary on that checkbox instead of the picklist directly.
CASE( Country__c, 'Afghanistan', 1, 'Albania', 1, 'Algeria', 1, 'Andorra', 1, 'Angola', 1, 'Antigua and Barbuda', 1, 'Argentina', 1,0 ) = 1
This formula checks the Country picklist value on each record. If the value matches one of the listed countries, the formula returns 1 (true); otherwise it returns 0 (false). The checkbox field is then set to checked whenever the record matches one of your target countries.
000390345

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.