<?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 tenure 12 months before in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-employee-tenure-12-months-before/m-p/3167636#M114039</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490244" data-lia-user-login="ejafarov" class="lia-mention lia-mention-user"&gt;ejafarov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Based on the previous topic we had, If you mean the TenureMeasure for the Same Month of previous year, you can create this measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    [TenureInThePreviousTopic],
    FILTER (
        ALL ( DateTable ),
        DateTable[YearMonthIndex] = MAX ( DateTable[YearMonthIndex] )-12
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Apr 2023 09:28:07 GMT</pubDate>
    <dc:creator>MohammadLoran25</dc:creator>
    <dc:date>2023-04-02T09:28:07Z</dc:date>
    <item>
      <title>Calculating employee tenure 12 months before</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-employee-tenure-12-months-before/m-p/3167308#M113988</link>
      <description>&lt;P&gt;Dears,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How can I find employee tenure 12 months before from selected date?&lt;/P&gt;&lt;P&gt;The below formula does not work correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tenure for 12 months before =&lt;BR /&gt;VAR SelectedDate = MAX(Teqvim[Date])&lt;BR /&gt;VAR RelevantPeriodStart = EDATE(SelectedDate, -12)&lt;BR /&gt;VAR T1 = CALCULATETABLE(Final, CROSSFILTER(Teqvim[Date], Final[Start Date], NONE))&lt;BR /&gt;VAR T2 = FILTER(T1, Final[Start Date] &amp;lt;= SelectedDate &amp;amp;&amp;amp; Final[Start Date] &amp;gt;= RelevantPeriodStart)&lt;BR /&gt;RETURN&lt;BR /&gt;AVERAGEX(&lt;BR /&gt;T2,&lt;BR /&gt;VAR StartDate = Final[Start Date]&lt;BR /&gt;VAR EndDate = COALESCE(Final[Resignation Date], TODAY())&lt;BR /&gt;RETURN DATEDIFF(StartDate, MIN(EndDate, SelectedDate), MONTH)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 22:18:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-employee-tenure-12-months-before/m-p/3167308#M113988</guid>
      <dc:creator>ejafarov</dc:creator>
      <dc:date>2023-04-01T22:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating employee tenure 12 months before</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-employee-tenure-12-months-before/m-p/3167636#M114039</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490244" data-lia-user-login="ejafarov" class="lia-mention lia-mention-user"&gt;ejafarov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Based on the previous topic we had, If you mean the TenureMeasure for the Same Month of previous year, you can create this measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    [TenureInThePreviousTopic],
    FILTER (
        ALL ( DateTable ),
        DateTable[YearMonthIndex] = MAX ( DateTable[YearMonthIndex] )-12
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 09:28:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-employee-tenure-12-months-before/m-p/3167636#M114039</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-02T09:28:07Z</dc:date>
    </item>
  </channel>
</rss>

