<?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: Calculating Employee turnover rate per month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4096518#M162565</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="790054" data-lia-user-login="MDeemter" class="lia-mention lia-mention-user"&gt;MDeemter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;/P&gt;
&lt;P&gt;Here I create a set of sample:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then add a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _currentdate =
    MAX ( 'Table'[Date] )
VAR _terminationsnumofmonth =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            MONTH ( 'employe'[Termination Date] ) = MONTH ( _currentdate )
        )
    )
VAR _beginningofmonthnum =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            'employe'[Starting Date]
                &amp;lt; DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
        )
    )
        - COUNTROWS (
            FILTER (
                ALLSELECTED ( employe ),
                'employe'[Termination Date]
                    &amp;lt; DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
            )
        )
RETURN
    _terminationsnumofmonth / _beginningofmonthnum
&lt;/LI-CODE&gt;
&lt;P&gt;The result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 03:09:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-13T03:09:45Z</dc:date>
    <item>
      <title>Calculating Employee turnover rate per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4094806#M162502</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eventhough I have read several posts on this topic, non seem to answer the question(s) that I have, so here I go:&lt;BR /&gt;&lt;BR /&gt;I am trying to calculate the monthly turonver rate of my employees.&amp;nbsp;&lt;BR /&gt;The tables and columns present are:&lt;BR /&gt;&lt;BR /&gt;1. A datetable&lt;/P&gt;&lt;P&gt;2. An employee table with:&lt;/P&gt;&lt;P&gt;- Employee ID&lt;BR /&gt;- Starting Date&lt;/P&gt;&lt;P&gt;- Termination Date&lt;BR /&gt;&lt;BR /&gt;Preferably I would like the turnover rate to be calculated as:&lt;BR /&gt;Number of terminations in given month / Average amount of employees in given month.&amp;nbsp;&lt;BR /&gt;However, if this is too much of a challenge it could also be:&lt;BR /&gt;Number of terminations in given month / Amount of employees at beginning of the month.&lt;BR /&gt;&lt;BR /&gt;I am really struggling with the relations and the calculations to make this work.&lt;BR /&gt;&lt;BR /&gt;Can someone please tell me step by step how to make this work.&amp;nbsp;&lt;BR /&gt;Would be huge &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 08:06:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4094806#M162502</guid>
      <dc:creator>MDeemter</dc:creator>
      <dc:date>2024-08-12T08:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Employee turnover rate per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4094820#M162503</link>
      <description>&lt;P&gt;Also I might add that the report has to be dynamic, so it should be possible to select a specific month with a slicer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 08:09:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4094820#M162503</guid>
      <dc:creator>MDeemter</dc:creator>
      <dc:date>2024-08-12T08:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Employee turnover rate per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4096518#M162565</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="790054" data-lia-user-login="MDeemter" class="lia-mention lia-mention-user"&gt;MDeemter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;/P&gt;
&lt;P&gt;Here I create a set of sample:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then add a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _currentdate =
    MAX ( 'Table'[Date] )
VAR _terminationsnumofmonth =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            MONTH ( 'employe'[Termination Date] ) = MONTH ( _currentdate )
        )
    )
VAR _beginningofmonthnum =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            'employe'[Starting Date]
                &amp;lt; DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
        )
    )
        - COUNTROWS (
            FILTER (
                ALLSELECTED ( employe ),
                'employe'[Termination Date]
                    &amp;lt; DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
            )
        )
RETURN
    _terminationsnumofmonth / _beginningofmonthnum
&lt;/LI-CODE&gt;
&lt;P&gt;The result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 03:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4096518#M162565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-13T03:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Employee turnover rate per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4120611#M163596</link>
      <description>&lt;P&gt;Strangely this works on your data. But if I copy the measure and fill in my table and columnnames, the percentages are all negatives and far from what they should be...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 11:22:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Employee-turnover-rate-per-month/m-p/4120611#M163596</guid>
      <dc:creator>MDeemter</dc:creator>
      <dc:date>2024-08-27T11:22:55Z</dc:date>
    </item>
  </channel>
</rss>

