Skip to main content
Hi All i was trying towriting a condition in formula field .

 

we have two dates started_date and end_date so according to my conditon 

 

here i am trying to calculate total bonous 

 

1> if end date is not there we can consider as the current date 

 

2>if end date is there .

 

for rough idea i have return if but the return type should be true or false 

 

here is my code ::::

 

IF(Last_Day_at_job__c, (Salary__c/ABS(((Today()-Starts_from__c)/365)*12)) *100, (Salary__c/    Total_Months_of_service__c) *100)

 

can anyone help me how to achive this and return if or else  values as number 
3 answers
  1. Oct 4, 2019, 10:50 AM
    Hi Shakti,

     

    As you said "return if or else  values as number " then you can use formula with data type as Number.

     

    IF(Last_Day_at_job__c, (Salary__c/ Total_Months_of_service__c) *100, (Salary__c/ABS(((NOW()-Starts_from__c)/365)*12)) *100)

     

    Hope this helps.

     

    Thanks
0/9000