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
vahidkhan lodhivahidkhan lodhi 

how can i get total experience ?

User-added image

As per above screen-shot i had inserted data in Former Employer2. I am getting Experience but i am not getting Total Experience. If i am inserting data in Former Employer1 than i am getting both Experience and Total Experience. If any solution is there please help me to solve this.
Jolly_BirdiJolly_Birdi
Hello @Lodhi

Please try this below code for Total Experience, Update Api's as per your fields.
 
IF(AND(NOT(ISBLANK(Start_Date1__c)),NOT(ISBLANK(End_Date1__c)),NOT(ISBLANK(Start_Date2__c)),NOT(ISBLANK(End_Date2__c))),
	TEXT((Year(End_Date2__c)-Year(Start_Date2__c)) + (Year(End_Date1__c)-Year(Start_Date1__c))) & ' Years ' & TEXT(
	if((Month(End_Date2__c)>Month(Start_Date2__c)),
	(Month(End_Date2__c)-Month(Start_Date2__c)) ,
	(12-Month(Start_Date2__c)-Month(End_Date2__c))) +
	if((Month(End_Date1__c)>Month(Start_Date1__c)),
	(Month(End_Date1__c)-Month(Start_Date1__c)) ,
	(12-Month(Start_Date1__c)-Month(End_Date1__c))))
	 & ' Months ' & TEXT((Day(End_Date2__c)-Day(Start_Date2__c)) + (Day(End_Date1__c)-Day(Start_Date1__c))) & ' Days' ,
	IF(AND(NOT(ISBLANK(Start_Date1__c)),NOT(ISBLANK(End_Date1__c)),
		Experience1__c,
		IF(AND(NOT(ISBLANK(Start_Date2__c)),NOT(ISBLANK(End_Date2__c))),
			Experience2__c,
			''
		)
	)
)



Please like and mark this as best answer if it helps you.

Thanks,
Jolly Birdi