Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
AkameNoGamma
Helper I
Helper I

YTD Attrition

I'm trying to figure out a formula that will generate the YTD attrition, but that catch is the numbers must come from the employee list that i have. the excel report has employee ID, date of join and date of separation columns. i was able to generate the monthly attrition %, but this time the YTD needs to refer to the opening headcount of my fiscal year, which is april XXXX

 

Here's the formula.

YTD % = Total Separations from April to the selected slicer (for example Oct 2023) / Average of Opening Headcount of April and Closing Headcount of Oct 2023).

 

for now i need the DAX for Total Separations from April to the selected slicer (for example Oct 2023) and Opening Headcount of April

1 REPLY 1
AkameNoGamma
Helper I
Helper I

I asked chat GPT to generate the total separations based from my Fiscal Year (2024), but I can't get any numbers. here's my formula. This is from a post here and I tweak a bit of it based on my understanding. but still I cant produce the result I need. 

 

Filters: Fiscal Year of 2024

 

Total Separations =
VAR _min_date = MINX(ALL('Date'), 'Date'[Date])
VAR _Expression =
    IF (
        ISFILTERED('Date'[Fiscal Year]),
        MAXX('Date', STARTOFMONTH(DATEADD('Date'[Date], 3 - MONTH('Date'[Date]), MONTH))),
        MAXX('Date', DATE(YEAR(MAX('Date'[Date])), 4, 1))
    )

RETURN
    CALCULATE (
        COUNTX (
            FILTER (
                'Table 1 (Employee List)',
                'Table 1 (Employee List)'[Effective Date of Seperation] >= _Expression
                    && 'Table 1 (Employee List)'[Effective Date of Seperation] <= _min_date
            ),
            'Table 1 (Employee List)'[Local Emp ID]
        ),
        CROSSFILTER('Table 1 (Employee List)'[Effective Date of Seperation], 'Date'[Date], None)
    )

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.