More Example Formulas

Follow the steps in the full examples to create a formula field. Use the example formulas in this section to help you create the formula to display the data category you want on the Turnover Report.

Identify Employees in a given Country and Contractors

Purpose

To identify employees in China and all contractors working with Full Time Equivalent values of less than 1.

Special fields

On the Employment Record, two formula fields:

  • Include Contractors1

    IF(ISPICKVAL(Contract_Type__c, "Indefinite") && (ISPICKVAL(fHCM2__Basis__c, "Contractor")), 
    IF(fHCM2__FTE__c >=1,"Include","Exclude"), 
    "")

    Evaluates special picklist field Contract Type and generic picklist field Basis to identify Contractors with Contract Type Indefinite, then evaluates the FTE values for those contractors.

    Returns Include for those Indefinite Contractors who are full time, and Exclude for those who are less than full time. Returns null if those conditions are not met.

  • Include Contractors2

    IF(ISPICKVAL(Contract_Type__c, "Definite") && (ISPICKVAL(fHCM2__Basis__c, "Contractor") && Contract_Length_Days__c >=90), 
    IF(fHCM2__FTE__c >=1,"Include","Exclude"), 
    "")

    Evaluates special picklist field Contract Type, generic picklist field Basis, and special field Contract Length Days to identify Contractors with Contract Type Definite and a Contract Length of 90 days or more, then evaluates the FTE values for those contractors. Returns Include for those Definite Contractors with contracts of 90 days or more who are full time, and Exclude for those who are less than full time. Returns null if those conditions are not met.

Formula

IF(fHCM2__Country__c = "China" || fHCM2__Current_Employment__r.Include_Contractors1__c = "Exclude" || fHCM2__Current_Employment__r.Include_Contractors2__c = "Exclude", "Contract & China", "All Other Employees")
  • Evaluates Country and returns Contract & China when Country is China. Returns All Other Employees when Country is not China.

  • Evaluates Include Contractors1 and returns Contract & China when the value is Exclude. Returns All Other Employees when value is not Exclude.

Evaluates Include Contractors2 and returns Contract & China when the value is Exclude. Returns All Other Employees when value is not Exclude.

Identify key talent

Purpose

To identify high value employees using Talent Plan ratings.

Formula

IF(ISPICKVAL(fHCM2__Current_Talent_Plan__r.fHCM2__Potential__c, "High") || ISPICKVAL(fHCM2__Current_Talent_Plan__r.fHCM2__Performance_Rating__c, "Exceeds Expectations") || (IF(ISPICKVAL(fHCM2__Current_Talent_Plan__r.fHCM2__Impact_of_Loss__c, "N/A") || ISPICKVAL(fHCM2__Current_Talent_Plan__r.fHCM2__Impact_of_Loss__c, "High") || ISPICKVAL(fHCM2__Current_Talent_Plan__r.fHCM2__Impact_of_Loss__c, "Medium"), 0, VALUE(LEFT(TEXT(fHCM2__Current_Talent_Plan__r.fHCM2__Impact_of_Loss__c),1))) >= 7), "Key Talent", 
"All Others")
  • Evaluates Talent Plan Potential rating and returns Key Talent when Potential is High.

  • Evaluates Talent Plan Performance Rating and returns Key Talent when Rating is Exceeds Expectations.

  • Evaluates Talent Plan Impact of Loss and returns Key Talent when Impact of Loss is High, Medium, or N/A.

    Early Talent Plans used Impact of Loss text values in the picklist.

  • Evaluates Talent Plan Impact of Loss and returns Key Talent when Impact of Loss is 7 or above.

    More recent Talent Plans use a numeric rating from 1 to 9.

Returns All Others when none of evaluated fields returns Key Talent.

Identify Employees in a given Country and Voluntary Leavers

Purpose

To identify employees in India and all voluntary leavers.

Formula

IF(fHCM2__Current_Employment__r.fHCM2__Reason_For_Leaving__c <> "Involuntary" || fHCM2__Country__c = "India","Voluntary & India","All Others")
  • Evaluates Reason For Leaving and returns Voluntary & India when Reason For Leaving is not Involuntary.

  • Evaluates Country and returns Voluntary & India when Country is India.

Returns All Others when the evaluated fields contain any other values.