Forum Discussion

Jace920's avatar
Jace920
Regular Visitor
1 year ago
Solved

Calculating 1st Year Employee Retention Rates

Greetings community! I've been tasked with calculating the 1 year retention rate of newly hired employees month over month.  I've spent a lot of time tweaking my DAX to achieve this, but have been u...
  • lbendlin's avatar
    lbendlin
    1 year ago

    I refactored the formula to make it bulletproof - still am arriving at different numbers.

     

    TerminatedWithin1Year =
    VAR a =
        CALCULATETABLE ( Hires, SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
    VAR b =
        ADDCOLUMNS (
            a,
            "termdate",
                CALCULATE (
                    MAX ( Terms[Term Date] ),
                    TREATAS ( { [Empl_ID] }, Terms[Empl_ID] )
                )
        )
    RETURN
        COUNTROWS (
            FILTER (
                b,
                COALESCE ( [termdate], dt"2030-01-01" ) < EDATE ( [MostRecentHireDate], 12 )
            )
        )

    I guess some of the confusion is around the mismatch between Fiscal and Calendar years.