Forum Discussion
Turnover calculation in DAX
- 6 years ago
Hi Anonymous ,
According to your sample tables, would you please refer to the measure below:
Turnover = VAR a = COUNTROWS ( leavers ) VAR b = CALCULATE ( COUNTROWS ( employees ), FILTER ( ALL ( employees ), RELATED ( weeklist[Offset to Current week] ) >= MAX ( weeklist[Offset to Current week] ) - 52 && RELATED ( weeklist[Offset to Current week] ) < MAX ( weeklist[Offset to Current week] ) ) ) / 52 RETURN DIVIDE ( a, b )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Refer my blog for active/current employee : https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
file :https://www.dropbox.com/s/excoqikgpyz5zvk/Current_employee.pbix?dl=0
How to deal with weeks using rank : https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
See if these can help. Does your data do not have date?
- Anonymous6 years agoNot applicable
amitchandak no dates, only the weekly offset as demonstrated, all the data is a weekly snapshot. I will see if I can repurpose what you have linked. Thanks.
- amitchandak6 years agoSuper User
Anonymous , Try with week rank. Is the sample data you provide is best we can use?
- Anonymous6 years agoNot applicable
amitchandak the sample data was just to give an indication of the layout, obviously to do a rolling 52 weeks for the last 52 weeks trend, 104 weeks history would be required. Shall I upload sample data? What's the best way to do that? A PBIX file?