Find your content:

Search form

You are here

CASE formula reading blanks

 
Share

I'm trying to get this formula field to display the correct field for the correct year. The values of the picklist at 2014, 2013, 2012. The related fields are just numbers. There are no syntax errors but it's returning nothing - not even the else result field.

CASE( Commercial_Sales_Year__c, "2014", 
of_commercial_customers_2014__c , "2013", 
of_commercial_customers_2013__c , "2012", 
of_commercial_customers_2012__c, 0)

What am I missing?


Attribution to: Sophia

Possible Suggestion/Solution #1

Are you sure you've got your CASE parameters right? Salesforce defines CASE as follows:

CASE(expression,​value1, result1, value2,​ result2,...,​ else_result)

You have a mix of variables and strings that makes it look like you are trying to do

CASE(expression1,result1, expression2, result2, ... else_result)

Also, your else_result parameter is a number, All the other items that look like results are strings. Is that what you intended?


Attribution to: Jagular
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34257

My Block Status

My Block Content