<?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: Count ex-members (TIN) based on MembershipEndDate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-ex-members-TIN-based-on-MembershipEndDate/m-p/3421219#M129519</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="613430" data-lia-user-login="tzaveri" class="lia-mention lia-mention-user"&gt;tzaveri&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here is the measure formula that can get rolling 2 year records and get distinct member count, you can try it if it suitable for your requirement.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula =
VAR currDate =
    MAX ( Table1[MembershipEndDate] )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Table1[TIN] ) ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [MembershipEndDate]
                &amp;gt;= DATE ( YEAR ( currDate ) - 2, MONTH ( currDate ), DAY ( currDate )
                    &amp;amp;&amp;amp; [MembershipEndDate] &amp;lt;= currDate )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 09:13:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-08T09:13:37Z</dc:date>
    <item>
      <title>Count ex-members (TIN) based on MembershipEndDate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-ex-members-TIN-based-on-MembershipEndDate/m-p/3418390#M129374</link>
      <description>&lt;P&gt;Looking to get count of ex-members (using their TIN in TIN column) from last 24 months based on MembershipEndDate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 19:23:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-ex-members-TIN-based-on-MembershipEndDate/m-p/3418390#M129374</guid>
      <dc:creator>tzaveri</dc:creator>
      <dc:date>2023-09-06T19:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count ex-members (TIN) based on MembershipEndDate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-ex-members-TIN-based-on-MembershipEndDate/m-p/3421219#M129519</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="613430" data-lia-user-login="tzaveri" class="lia-mention lia-mention-user"&gt;tzaveri&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here is the measure formula that can get rolling 2 year records and get distinct member count, you can try it if it suitable for your requirement.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula =
VAR currDate =
    MAX ( Table1[MembershipEndDate] )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Table1[TIN] ) ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [MembershipEndDate]
                &amp;gt;= DATE ( YEAR ( currDate ) - 2, MONTH ( currDate ), DAY ( currDate )
                    &amp;amp;&amp;amp; [MembershipEndDate] &amp;lt;= currDate )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 09:13:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-ex-members-TIN-based-on-MembershipEndDate/m-p/3421219#M129519</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-08T09:13:37Z</dc:date>
    </item>
  </channel>
</rss>

