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
Matthew MarshMatthew Marsh 

Level Up with Advanced Formulas

Hello, 

My trailhead wont let be beat this challenge. I says:

"Challenge Not yet complete... here's what's wrong: 
The 'Opportunity_Progress__c' formula field does not exist or is not of type 'Number'"

Heres my code:

IF( Percent_Completed__c <=  0.25, "Early", IF( Percent_Completed__c  <= 0.75, "Middle", "Late" ) )

(TODAY() -DATEVALUE(CreatedDate))/ (CloseDate-DATEVALUE(CreatedDate))

What am I doing wrong? The top formula outputs as text, bottom one is a percent

Thank you for help!

 
Best Answer chosen by Matthew Marsh
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000MJIqIAO
2)https://developer.salesforce.com/forums/?id=906F0000000D8IDIA0

Percentage Completed field:
(DATEVALUE( CreatedDate ) - CloseDate ) / 100

Opportunity progress :
IF( Percent_Completed__c < 25 , "Early", 
IF(Percent_Completed__c >25 && Percent_Completed__c <75 ,"Middle","Late"))

Let us know if this will help you. If not then please share your field screen shot

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000MJIqIAO
2)https://developer.salesforce.com/forums/?id=906F0000000D8IDIA0

Percentage Completed field:
(DATEVALUE( CreatedDate ) - CloseDate ) / 100

Opportunity progress :
IF( Percent_Completed__c < 25 , "Early", 
IF(Percent_Completed__c >25 && Percent_Completed__c <75 ,"Middle","Late"))

Let us know if this will help you. If not then please share your field screen shot
This was selected as the best answer
Matthew MarshMatthew Marsh
field
It still returned same error.
Matthew MarshMatthew Marsh
error
Amit Chaudhary 8Amit Chaudhary 8
Please update the field Lable and API name to "Opportunity Progress" and "Opportunity_Progress__c"

NOTE:- you added wrong name "Opportunity Progess"

 
JP Rogers 13JP Rogers 13
B/c they say "This formula field should use TODAY() to calculate what percentage of the time between an opportunity’s CreatedDate and CloseDate has passed"; I came up with this approach to show % of days that has passed from Created to Close: 
IF(
        CloseDate - Today()>0,
        ((Today() - DATEVALUE(CreatedDate)) / (CloseDate - DATEVALUE(CreatedDate))),
   1)
 
RAVITEJA C 9RAVITEJA C 9
Hi Folks,

Just do it create Opportunuty Object->Custom Field(formula)->Give name(Percent completed)->Datatype-Type(percent)->Formula(Below)

(TODAY() - DATEVALUE(CreatedDate))/(CloseDate - DATEVALUE(CreatedDate))

Again(Custom Field(formula)->Give Name(Opportunity Progress)->Datatype-Type(Text)->Formula(Below))
IF( Percent_Completed__c <= 25 , "Early", 
IF(Percent_Completed__c >25 && Percent_Completed__c <=75 ,"Middle","Late")) Then save 

You completed this challenge:)
Devon PlopperDevon Plopper
Hello All, 

So, none of the formulas are being allowed in my trailhead playground. I continue to get this error message while working to build the helper formula for this Hands-On Challenge. Anyone have any ideas? 
Error Message
Ankush kumar 23Ankush kumar 23
My logic is as below :-
Percent complete formula :-
IF (
DATEVALUE( CreatedDate )= TODAY() || CloseDate = DATEVALUE( CreatedDate ) ,
0,
((TODAY() -DATEVALUE(CreatedDate )) / (CloseDate - DATEVALUE(CreatedDate )))*100

)

Explaination :-
If the oppurtunity is closed date is same as created data then percent completed will be 0% else No. of days past(TODAY() -DATEVALUE(CreatedDate ) divided by Total number of days*100 ie (CloseDate - DATEVALUE(CreatedDate ))*100

Now we will use this percent complete formula for our final goal which is Opportunity Progress
Opportunity Progress formula :-

IF( Percent_Completed__c <= 25 ,"Early" ,
IF(Percent_Completed__c > 25 && Percent_Completed__c < 75,"Middle","Late"))


Let know if anything wrong . I Passed the test Level Up with Advanced Formulas with this logic 
Thanks ,
Ankush Kumar

 
Kajal Rane 3Kajal Rane 3
Level Up with Advanced Formulas
Hi Folks Correct Solution is,

Opportunity Progress:
Object Manager ->Opportunity->  Field and Relationship -> new - > Formula - > 'Opportunity Progress'  - > Formula return type: Text

IF(
(Today() - DateValue(CreatedDate)) / (CloseDate - DateValue(CreatedDate)) <= 0.25, "Early",
IF(
AND(
(Today() - DateValue(CreatedDate)) / (CloseDate - DateValue(CreatedDate)) > 0.25,
(Today() - DateValue(CreatedDate)) / (CloseDate - DateValue(CreatedDate)) < 0.75),"Middle",
IF((Today() - DateValue(CreatedDate)) / (CloseDate - DateValue(CreatedDate)) >0.75,"Late",Null)))


Percent Completed:

(Today() - DateValue(CreatedDate)) / (CloseDate - DateValue(CreatedDate))
Carmen-Silvia MantaCarmen-Silvia Manta
Contribution Percentage:
ExpectedRevenue /100000

Contribution Level:
if(
Contribution_Percentage__c <= 0.1, "Low",
(if(
Contribution_Percentage__c > 0.1 && Contribution_Percentage__c <= 0.4, "Medium", "High")))
Turan FedaiTuran Fedai
It worked  too;

Contribution Percentage:
ExpectedRevenue /100000

Contribution Level:
IF( Contribution_Percentage__c  <= 0.10, 'Low', 
   IF(Contribution_Percentage__c   >  0.40, 'High', 
     'Medium'
      ) 
    )