+ Start a Discussion
GMASJGMASJ 

Need help in formula

Hi, 

I need to get this logical formual in salesforce formula. 

Below is the logical formula. 

(365 – ( MIN(365,MAX(0,LSD-FYSD)) + MIN(365,MAX (0,FYED-LED)))*100)/365

Here 
LSD , FYSD, FYED LED are date fields. 

Please suggest me how to put this inside a salesforce formula field. 

Thanks
Sudhir
ANUTEJANUTEJ (Salesforce Developers) 
Hi GMASJ,

Are you getting any error while using this formula?

Regards,
Anutej
GMASJGMASJ
There is no error Here is the logic. I need help 

(365 – ( MIN(365,MAX(0,LSD-FYSD)) + MIN(365,MAX (0,FYED-LED)))*100)/365

In above formula 

First half conidtion MIN(365,MAX(0,LSD-FYSD))

  IF LSD - FYSD < 0 THEN RETURN 0 ELSE RETURN VALUE ( LSD - FYSD )  WHICH IS MAX
   
    MIN ( 365, ABOVE VALUE) 

Please let me know if you dont get what I am explaining.  I tried with IF condition but getting bollean error need hep on this condition. 
  
Thanks
GMASJ
5 Hanshaw5 Hanshaw
The IF statement is IF(logic_test, value_if_true, value_if_false). 
 
MIN(365,IF( (LSD - FYSD) < 0, 0, (LSD - FYSD)))
GMASJGMASJ
Can you help me with the IF condition is this possible