Level Up with Advanced Formulas
YOUR CHALLENGE
Create a formula that shows where an Opportunity is in the pipeline.
Create a formula field that classifies an Opportunity as either “Early”, “Middle”, or “Late”. This formula field should use TODAY() to calculate what percentage of the time between an opportunity’s CreatedDate and CloseDate has passed, and label the opportunity accordingly.
- This formula should be on the Opportunity object
- This formula should be named 'Opportunity Progress' with the resulting API name Opportunity_Progress__c
- This formula should return 'Early' if less than or equal to 25% of an opportunity has passed
- This formula should return 'Middle' if between 25% and 75% of an opportunity has passed
- This formula should return 'Late' if more than 75% of an opportunity has passed
- This formula should reference a helper formula field, also on the Opportunity Object, with the type Percent and the name Percent Completed
- Percent Completed should return the percentage of the time that has passed between an opportunity’s CreatedDate and CloseDate
The 'Opportunity_Progress__c' formula field does not exist or is not of type 'Number'
Helper formula I used for: Percent Completed: “It works!”
((TODAY() - DATEVALUE(CreatedDate))
/((TODAY() - DATEVALUE(CreatedDate)) + ( CloseDate - TODAY())))
Problem they want the formula behind the “Opportunity Progress” field to have a Number as the data type, but it returns TEXT: “Early”, “Middle”, and “Late”.
This formula is the one I changed to, so I could use the data type – Number, but I still get the error message above.
IF(Percent_Completed__c <= 0.25, 1,
IF(Percent_Completed__c >= 0.75, 3,
2) )
I changed the return data type to Text, so it would the return the “Early”, “Middle”, and “Late” that they requested, but I still get the error, which makes some sense, since I don’t have a number being returned?