<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Employee Turnover % by Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1313334#M22975</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Please check if my blog can help&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2020 05:29:29 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-08-21T05:29:29Z</dc:date>
    <item>
      <title>Employee Turnover % by Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1312461#M22934</link>
      <description>&lt;P&gt;Hey guys, I've been struggling to find specific DAX answers to this above question, although it appears its been asked multiple times.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attemping to provide the Employee Turnover % by Month - the formula for this is: (Employees Terminated / (Count Employees on first day of the month + Count of Employees on last day of the month) / 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data fields are as follows: NAME, HIRE DATE, TERMINATION DATE, STATUS(Active or Inactive)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a date table set up currently with 2 separate inactive relationships with the hire date and termination date, which was required for doing a rolling 12 month calculation that I found through this forum below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I need help with DAX formulas for:&lt;BR /&gt;&lt;BR /&gt;1. Count of Employees at Start of Month&lt;BR /&gt;2. Count of Employees at End of Month&lt;BR /&gt;3. Count of Employees Terminated during the Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a solution through this forum for a Rolling 12 Month Average for Turnover % here(2 links below), and it was very helpful, but I need the by month %:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://finance-bi.com/power-bi-employee-count-by-month/" target="_blank"&gt;https://finance-bi.com/power-bi-employee-count-by-month/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://finance-bi.com/power-bi-employee-turnover-rate/#:~:text=The%20Employee%20Turnover%20Rate%20compares,a%20turnover%20rate%20of%2020%25." target="_blank"&gt;https://finance-bi.com/power-bi-employee-turnover-rate/#:~:text=The%20Employee%20Turnover%20Rate%20compares,a%20turnover%20rate%20of%2020%25.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 20:50:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1312461#M22934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-20T20:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Employee Turnover % by Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1313334#M22975</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Please check if my blog can help&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 05:29:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1313334#M22975</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-21T05:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Employee Turnover % by Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1314462#M23014</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Truth is you don't have to limit the calculation
// to just a month. You can calculate what you want
// on ANY period of time. This will, of course,
// also work for months in particular.
// Please do NOT connect your Dates table to any
// of the fields in the Employees table.


[# Emps At Start Of Period] =
// These are emps that have
// hire date &amp;lt;= start of period
var __periodStart = MIN( Dates[Date] )
return
    CALCULATE(
        countrows( Employees ),
        KEEPFILTERS( Employees[Hire Date] &amp;lt;= __periodStart )
    )

[# Emps At End Of Period] =
// These are emps that have
// their hire date &amp;lt;= end of period
// and their termination date &amp;gt;=
// end of period.
var __periodEnd = MAX( Dates[Date] )
return
    CALCULATE(    
        countrows( Employees ),
        KEEPFILTERS( Employees[Hire date] &amp;lt;= __periodEnd ),
        KEEPFILTERS(
            Employees[Termination Date] &amp;gt;= __periodEnd
            ||
            isblank( Employees[Termination Date] )
        )
    )
    
[# Emps Terminated During Period] =
// self-explanatory
var __periodStart = MIN( Dates[Date] )
var __periodEnd = MAX( Dates[Date] )
return
    CALCULATE(
        countrows( Employees ),
        KEEPFILTERS( __periodStart &amp;lt;= Employees[Termination Date] ),
        KEEPFILTERS( Employees[Termination Date] &amp;lt;= __periodEnd )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 14:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1314462#M23014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T14:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Employee Turnover % by Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1315007#M23067</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right away when I'm trying to implement the first DAX for "# Emps At start of period" I'm getting an error that "Too many arguments were passed to the COUNTROWS function, maximum is 1."&amp;nbsp; Is there some other kind of manipulation I need to do to the hire date field in my data?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 14:28:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1315007#M23067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T14:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Employee Turnover % by Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1315121#M23070</link>
      <description>This is because I've got too many things to think of and I don't create models to check my code. I just write it. Try the code above now.</description>
      <pubDate>Fri, 21 Aug 2020 14:58:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1315121#M23070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T14:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Employee Turnover % by Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1315145#M23072</link>
      <description>&lt;P&gt;Thanks for the quick response, I'll try in the next few minutes and then give you an update.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 15:05:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Employee-Turnover-by-Month/m-p/1315145#M23072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T15:05:36Z</dc:date>
    </item>
  </channel>
</rss>

