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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
omkar_nag123
Regular Visitor

Attrition Rate Formula

Hi, @amitchandak 

I'm trying to create Attrition Rate Dax,

Attrition Rate Formula% = No of employee who joined past 12 month / No of employee who have join last 12 month * 100

 

I've created Attrition Rate Dax so I got an error in this formula.Screenshot (63).png

 

5 REPLIES 5
v-shex-msft
Community Support
Community Support

HI @omkar_nag123,

Any update here? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

HI @omkar_nag123,

The error message appears when you try to return the wrong result type in the formula. For the current expression, dateadd function will return a list of values that measure not supported.

If you want to get the last year date based on the current date value, you can try to use the date function to do these calculations.

measure =
VAR currDate =
    MAX ( employee[HireDate] )
RETURN
    DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@omkar_nag123 , refer if these formulae can help

 

Hired Employee = CALCULATE(COUNT(Employee[Employee Id ]),USERELATIONSHIP(Employee[Start Date],'Table'[Date]) )

 

Terminated Employees = CALCULATE(COUNT(Employee[Employee Id ]),USERELATIONSHIP(Employee[End Date],'Table'[Date]),not(ISBLANK(Employee[End Date])))

 

Hired Employee rolling 12 = calculate([Hired Employee], DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

Terminated Employees rolling 12 = calculate([Terminated Employees], DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

Hi,

Sorry I wrote wrong formula,

below given is the right formula.

 

Attrition Rate Formula% = No of employee who joined past 12 month and who left the company / No of employee who have join last 12 month * 100

@omkar_nag123 , Hired and left

 

Hired Employee rolling 12 , who has left too = calculate(calculate([Hired Employee], filter(Employee,  not(ISBLANK(Employee[End Date])) ) ) , DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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