You need to sign in to do that
Don't have an account?
Excluding blank values from a formula
Hello-
I have a formula field that is calculating an "Opportunity Score" based on certain values. It is displaying accurate percentages EXCEPT when a field if blank. Blanks seem to hold the same value as Not Defined (0%). How do I exclude blank values into the below formula?
IF(
ISPICKVAL(Opportunity_Timeframe__c, ""),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
)/200,
IF(
ISPICKVAL(Opportunity_Timeframe__c, "Introduction"),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
)/200,
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Timeframe__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
)/300))
In the example below, since Opportunity Expectation is set to Defined which is worth 100 and the other two fields are blank we want to give this opportunity a 100% score.

Any help would be much appreciated! Thank you.
Kim
I have a formula field that is calculating an "Opportunity Score" based on certain values. It is displaying accurate percentages EXCEPT when a field if blank. Blanks seem to hold the same value as Not Defined (0%). How do I exclude blank values into the below formula?
IF(
ISPICKVAL(Opportunity_Timeframe__c, ""),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
)/200,
IF(
ISPICKVAL(Opportunity_Timeframe__c, "Introduction"),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
)/200,
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Timeframe__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0)
)/300))
In the example below, since Opportunity Expectation is set to Defined which is worth 100 and the other two fields are blank we want to give this opportunity a 100% score.
Any help would be much appreciated! Thank you.
Kim
Thank you for the quick response. Would I need to do this for each line? Like below.
IF(
ISPICKVAL(Opportunity_Timeframe__c, ""),
IF(NOT(ISBLANK(Opportunity_Need__c)),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0),’Value is NULL’)
IF(NOT(ISBLANK(Opportunity_Expectation__c)),
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0),’Value is NULL’)
)/200,
IF(
ISPICKVAL(Opportunity_Timeframe__c, "Introduction"),
IF(NOT(ISBLANK(Opportunity_Need__c)),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0),’Value is NULL’)
IF(NOT(ISBLANK(Opportunity_Expectation__c)),
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0),’Value is NULL’)
)/200,
IF(NOT(ISBLANK(Opportunity_Need__c)),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0),’Value is NULL’)
IF(NOT(ISBLANK(Opportunity_Timeframe__c)),
+CASE(Text(Opportunity_Timeframe__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0) ,’Value is NULL’)
IF(NOT(ISBLANK(Opportunity_Expectation__c)),
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,0) ,’Value is NULL’)
)/300))
IF(
AND(
ISPICKVAL(Opportunity_Timeframe__c, ""),
ISPICKVAL(Opportunity_Need__c, ""),
ISPICKVAL(Opportunity_Expectation__c, "")), 0.00,
IF(
ISPICKVAL(Opportunity_Timeframe__c, ""),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
)/200,
IF(
ISPICKVAL(Opportunity_Timeframe__c, "Introduction"),
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
)/200,
(CASE(Text(Opportunity_Need__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
+CASE(Text(Opportunity_Timeframe__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
+CASE(Text(Opportunity_Expectation__c),'Defined',100,'Partially Defined',50,'Not Defined',0,100)
)/300)))