<?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: Rolling 12-Month Employee Turnover in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4730021#M181192</link>
    <description>&lt;P&gt;The way I would approach this is to create a new table with employee info ( name, employee number, temp or permanent etc ) and link this to both headcount and termination tables. Delete the existing relationships before you do this.&lt;/P&gt;
&lt;P&gt;Create a date table, marked as a date table, and link that to both termination and headcount tables from 'Date'[Date]. Make sure that there is a year month column of type date, set to display as "Mar 25". Use this in your visual.&lt;/P&gt;
&lt;P&gt;Create measures like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling 12 month termination total % =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR DatesToUse =
    DATESBETWEEN ( 'Date'[Year month], EOMONTH ( MaxDate, -13 ) + 1, MaxDate )
VAR AvgHeadcount =
    AVERAGEX (
        DatesToUse,
        CALCULATE ( SUM ( Headcount[Headcount] ), Employees[Type] = "Permanent" )
    )
VAR TotalTerminations =
    CALCULATE (
        SUM ( Terminations[Terminations] ),
        DatesToUse,
        Employees[Type] = "Permanent"
    )
VAR Result =
    DIVIDE ( TotalTerminations, AvgHeadcount )
RETURN
    Result
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rolling 12 month termination voluntary % =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR DatesToUse =
    DATESBETWEEN ( 'Date'[Year month], EOMONTH ( MaxDate, -13 ) + 1, MaxDate )
VAR AvgHeadcount =
    AVERAGEX (
        DatesToUse,
        CALCULATE ( SUM ( Headcount[Headcount] ), Employees[Type] = "Permanent" )
    )
VAR TotalTerminations =
    CALCULATE (
        SUM ( Terminations[Terminations] ),
        DatesToUse,
        Employees[Type] = "Permanent",
        Terminations[Type] = "Voluntary"
    )
VAR Result =
    DIVIDE ( TotalTerminations, AvgHeadcount )
RETURN
    Result
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rolling 12 month termination involuntary % =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR DatesToUse =
    DATESBETWEEN ( 'Date'[Year month], EOMONTH ( MaxDate, -13 ) + 1, MaxDate )
VAR AvgHeadcount =
    AVERAGEX (
        DatesToUse,
        CALCULATE ( SUM ( Headcount[Headcount] ), Employees[Type] = "Permanent" )
    )
VAR TotalTerminations =
    CALCULATE (
        SUM ( Terminations[Terminations] ),
        DatesToUse,
        Employees[Type] = "Permanent",
        Terminations[Type] = "Involuntary"
    )
VAR Result =
    DIVIDE ( TotalTerminations, AvgHeadcount )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 12 Jun 2025 10:34:50 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2025-06-12T10:34:50Z</dc:date>
    <item>
      <title>Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4729920#M181188</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a fairly new user on the tool and have a tough challenge to crack on employee turnover. I am basically looking to build a metric that would breakdown our attrition in 12 month outlooks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for May 2025, it would take our average headcount per month (just total headcount of each month averaged) from June'24 to May'25, and then add up our leavers over that time and divide the 2 numbers for the %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created 2 main data sources:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Heacount - which has each period Jan'25, Feb'25 etc&lt;/LI&gt;&lt;LI&gt;Terminations - File with our leavers, termination dates and then categorised by voluntary and involuntary&lt;/LI&gt;&lt;LI&gt;Linked the user ID and Period of both files&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Is there a way to create something that would only look at our Permanenet Employees, and break this figure down by Total %, Voluntary and Involuntary %?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if more info is needed ive tried to cover as best as possible the task.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 09:44:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4729920#M181188</guid>
      <dc:creator>Andonip</dc:creator>
      <dc:date>2025-06-12T09:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4730021#M181192</link>
      <description>&lt;P&gt;The way I would approach this is to create a new table with employee info ( name, employee number, temp or permanent etc ) and link this to both headcount and termination tables. Delete the existing relationships before you do this.&lt;/P&gt;
&lt;P&gt;Create a date table, marked as a date table, and link that to both termination and headcount tables from 'Date'[Date]. Make sure that there is a year month column of type date, set to display as "Mar 25". Use this in your visual.&lt;/P&gt;
&lt;P&gt;Create measures like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling 12 month termination total % =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR DatesToUse =
    DATESBETWEEN ( 'Date'[Year month], EOMONTH ( MaxDate, -13 ) + 1, MaxDate )
VAR AvgHeadcount =
    AVERAGEX (
        DatesToUse,
        CALCULATE ( SUM ( Headcount[Headcount] ), Employees[Type] = "Permanent" )
    )
VAR TotalTerminations =
    CALCULATE (
        SUM ( Terminations[Terminations] ),
        DatesToUse,
        Employees[Type] = "Permanent"
    )
VAR Result =
    DIVIDE ( TotalTerminations, AvgHeadcount )
RETURN
    Result
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rolling 12 month termination voluntary % =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR DatesToUse =
    DATESBETWEEN ( 'Date'[Year month], EOMONTH ( MaxDate, -13 ) + 1, MaxDate )
VAR AvgHeadcount =
    AVERAGEX (
        DatesToUse,
        CALCULATE ( SUM ( Headcount[Headcount] ), Employees[Type] = "Permanent" )
    )
VAR TotalTerminations =
    CALCULATE (
        SUM ( Terminations[Terminations] ),
        DatesToUse,
        Employees[Type] = "Permanent",
        Terminations[Type] = "Voluntary"
    )
VAR Result =
    DIVIDE ( TotalTerminations, AvgHeadcount )
RETURN
    Result
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rolling 12 month termination involuntary % =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR DatesToUse =
    DATESBETWEEN ( 'Date'[Year month], EOMONTH ( MaxDate, -13 ) + 1, MaxDate )
VAR AvgHeadcount =
    AVERAGEX (
        DatesToUse,
        CALCULATE ( SUM ( Headcount[Headcount] ), Employees[Type] = "Permanent" )
    )
VAR TotalTerminations =
    CALCULATE (
        SUM ( Terminations[Terminations] ),
        DatesToUse,
        Employees[Type] = "Permanent",
        Terminations[Type] = "Involuntary"
    )
VAR Result =
    DIVIDE ( TotalTerminations, AvgHeadcount )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Jun 2025 10:34:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4730021#M181192</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-06-12T10:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4730176#M181198</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="744978" data-lia-user-login="Andonip" class="lia-mention lia-mention-user"&gt;Andonip&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for reaching out to the Microsoft fabric community forum. Also, thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;,&amp;nbsp;for those valuable insights for this thread. &lt;BR /&gt;&lt;BR /&gt;After thoroughly reviewing the details you provided, I reproduced the scenario again, and it worked on my end. I used it as sample data and successfully implemented it.&lt;BR /&gt;&lt;BR /&gt;outcome:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I am also including .pbix file for your better understanding, please have a look into it:&lt;BR /&gt;&lt;BR /&gt;If this post&amp;nbsp;helps, then please give us ‘Kudos’ and consider&amp;nbsp;Accept it as a solution&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;&lt;BR /&gt;Thank you for using Microsoft Community Forum.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 12:00:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4730176#M181198</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-06-12T12:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731580#M181241</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="902865" data-lia-user-login="v-kpoloju-msft" class="lia-mention lia-mention-user"&gt;v-kpoloju-msft&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is great thank you soo much for all your help! I am finding a small problem I think related to the Date table relationships. I have tried to replicate the Period to the Termination Date with Many to One, Single but I wont accept this due to duplicate values, and the Many to Many wont return the right figures.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Date Table I used was:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DateTable =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALENDARAUTO&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Year"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Month"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"mmmm"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Month Number"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;And then created a Period Column that would&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Period =&lt;/SPAN&gt; &lt;SPAN&gt;STARTOFMONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DateTable&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Do you know where the issue might be?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Antonis&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 12:54:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731580#M181241</guid>
      <dc:creator>Andonip</dc:creator>
      <dc:date>2025-06-13T12:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731626#M181248</link>
      <description>&lt;P&gt;Link DateTable[Date] to the termination date, then it will allow a one-to-many, single direction relationship.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 13:35:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731626#M181248</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-06-13T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731728#M181252</link>
      <description>&lt;P&gt;I see that works perfectly and gets me the right figure! Though when testing to break down by similar elements like a Department, I can see it's still reporting on a total figure level. For example I am returning the correct leavers, but the avergae HC returns the entire company. Do you get the same?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 14:42:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731728#M181252</guid>
      <dc:creator>Andonip</dc:creator>
      <dc:date>2025-06-13T14:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12-Month Employee Turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731732#M181253</link>
      <description>&lt;P&gt;The Department column would need to be able to filter both headcount and termination tables. Ideally you would integrate that into the employee table, which filters both.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 14:47:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12-Month-Employee-Turnover/m-p/4731732#M181253</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-06-13T14:47:37Z</dc:date>
    </item>
  </channel>
</rss>

