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
Michael KellyMichael Kelly 

Trailhead advanced formula module 6

Working on trailhead challenge.  Trying nested if statement in formula  basically > or equal to 25=early   between 25 and 75 =middle  >75 late
here is my formula  keep getting error

IF( Percent_Complete__c  <= 25), "Early",
 IF( AND ( Percent_Complete__c >25, Percent_Complete__c  <= 75),"Middle",
 IF( Percent_Complete__c >75,"Late"))) 
R Z KhanR Z Khan
This worked for me
IF(Percent_Completed__c<=0.25,'Early', 
IF(Percent_Completed__c>0.75, 'Late', 
'Middle'))
Maharajan CMaharajan C
Hi Michael,

Percent Completed Formula Field : (TODAY() - DATEVALUE(CreatedDate)) / (CloseDate - DATEVALUE(CreatedDate))
Return Type : Percent

Opportunity Progress Formula Field :
IF( 
Percent_Completed__c >= 0.75, "Late", 
IF ( 
Percent_Completed__c >= 0.25, "Middle", 
"Early" 

)
Return Type : Text

Use the Above Formulas Surely You got the Answer.

Let Me Know is that Helpful to You.

Thanks,
Raj
(Sweet Potato Tec)
Rupal KumarRupal Kumar
Hi,Michael

I hope this link help you.
https://success.salesforce.com/answers?id=9063000000048w5AAA



Thanks
Rupal Kumar
http://mirketa.com
Deepthi BDeepthi B
Hi,

I tried working on the module and the below formula worked well for me. 
IF( 
   Percent_Completed__c >= 0.75, "Late", 
        IF ( 
              Percent_Completed__c >= 0.25, "Middle", 
              "Early" 
   ) 
)

Thanks,
Deepthi
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