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
Tyler GriffinTyler Griffin 

Row Level Formula with Pick List

Good Morning, 

I am trying to write a row level formula into a report, but am having issues with a multiselect picklist. Can you please tell me how to correct this formula error. 

Essentially I want to add up Direct Consulting Value, Direct Prof Services Values, and Direct MSP Value if Growth Initiative (multiselect picklist) equals Elevate. 

Here is what I have so far:
IF(ISPICKVAL(Opportunity.Growth_Initiatives__c, "Elevate"),Opportunity.Direct_Consulting_Value__c+Opportunity.Direct_Prof_Services_Value__c+Opportunity.Direct_MSP_Value__c)

Getting the error:
Error when encoding row level formula: Field Opportunity.Growth_Initiatives__c is a multiselect picklist field. Multi Select pick list fields are only supported in certain functions. 

Thank you for any help provided!
Tyler Griffin

 
SubratSubrat (Salesforce Developers) 
Hello Tyler ,

Multi-select picklist fields cannot be used directly in formulas, but you can use the INCLUDES function to check if a specific value is selected in the multi-select picklist. Here's how you can modify your formula to use the INCLUDES function:
 
IF(INCLUDES(Opportunity.Growth_Initiatives_c, "Elevate"), Opportunity.Direct_Consulting_Valuec + Opportunity.Direct_Prof_Services_Valuec + Opportunity.Direct_MSP_Value_c, 0)

If it helps please mark this as Best Answer.
Thank you.
Tyler GriffinTyler Griffin
Thank you for that information. Unfortunately I still get a "Source Field Growth Initiaitves is invalid or not supported." It also isnt available to select in the fields box either. So I have to type in the API to get it to pull. Any ideas? Thanks!

User-added image
Tyler GriffinTyler Griffin
A better look at my current formula. Sorry that picture was kind of small. 
IF(INCLUDES(Opportunity.Growth_Initiatives__c, "SMX Elevate"),Opportunity.Direct_Consulting_Value__c+Opportunity.Direct_Prof_Services_Value__c+Opportunity.Direct_MSP_Value__c,0)
SubratSubrat (Salesforce Developers) 
Hello Tyler ,

Can you please confirm that the Opportunity.Growth_Initiatives__c field is visible to your user profile, and that you have read access to it.
-> https://help.salesforce.com/s/articleView?id=sf.users_profiles_fls.htm&type=5

https://www.youtube.com/watch?v=-d2H_PPZCFQ


Check if the field API name is spelled correctly and matches the API name of the field in the object.

Thank you.
Hakuna MatataHakuna Matata
The reason you are getting an error is that multi-select picklist fields cannot be referenced directly in formula fields in Salesforce reports. To reference a multi-select picklist field in a formula field in a report, you need to use a function that is designed to work with multi-select picklists.
In your case, you can use the INCLUDES function to check if the multi-select picklist field contains the value "Elevate". Here's the updated formula:
IF(INCLUDES(Opportunity.Growth_Initiatives__c, "Elevate"), Opportunity.Direct_Consulting_Value__c+Opportunity.Direct_Prof_Services_Value__c+Opportunity.Direct_MSP_Value__c, 0)
This formula checks if the multi-select picklist field "Growth_Initiatives__c" contains the value "Elevate". If it does, it adds the values of the three fields you mentioned. If it doesn't, it returns a value of 0.
I hope this helps! Let me know if you have any further questions.
---
Manok na Pula
tehero 3859tehero 3859
The error message you received indicates that multi-select picklist fields can only be used in certain functions within the row level formula. In your current formula, you are using the ISPICKVAL function, which does not support multi-select picklist fields.
Instead, you should use the INCLUDES function, which is designed to work with multi-select picklist fields. Here's an updated formula that should work:
IF(INCLUDES(Opportunity.Growth_Initiatives__c, "Elevate"), Opportunity.Direct_Consulting_Value__c + Opportunity.Direct_Prof_Services_Value__c + Opportunity.Direct_MSP_Value__c, 0)
This formula checks if the "Elevate" value is included in the multi-select picklist field, and if so, it adds up the specified values. If "Elevate" is not selected, the formula returns 0.
Mingdi LiuMingdi Liu
In this link it explains that row-level formula in reports does not support Multiselect picklist.
Row-level formulas don't support these field types:
Boolean
Timeonly
Email
Multiselect picklist
https://help.salesforce.com/s/articleView?id=sf.reports_formulas_row_level_limits.htm&type=5