<?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 Completed Programs for Enrolled Persons on or after filter Dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4290253#M170265</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834634" data-lia-user-login="SrMatto" class="lia-mention lia-mention-user"&gt;SrMatto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a little confused. If possible, please tell me about the logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's how I understand it:&lt;BR /&gt;___________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;In the first case, the 2 of the sport is made up of 20212 and 20232.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;In the logic, we can get&amp;nbsp;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;8&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;10&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;13&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;15 from&amp;nbsp;FactEnrollment table:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then filter these ID in the&amp;nbsp;FactCompletion table, so that the result is 1(Craftsman)+2(Sport)&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Same to the second case, the result should be 2.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;___________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is something I‘ve misunderstood, please point it out.&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, 19 Nov 2024 05:57:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-19T05:57:57Z</dc:date>
    <item>
      <title>Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287253#M170151</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I'm trying to achieve the following calculation:&lt;/P&gt;&lt;P&gt;"Count of all the program&amp;nbsp;that are completed on or after some enrollment date".&lt;/P&gt;&lt;P&gt;In the context of this data model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all the persons enrolled &lt;STRONG&gt;on one or more&lt;/STRONG&gt; IdDate,&amp;nbsp;count all FactCompletion[Program]&amp;nbsp;that have a FactCompletion[degree of completion]="Complete",&lt;STRONG&gt;&amp;nbsp;on or after&lt;/STRONG&gt; the selected enrollment dates&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the data model structure with the bridge table may not be changed (other Facts have been removed).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For example, for semeter 2 of 2020 and 2021, the enrolled are:&lt;/P&gt;&lt;DIV class=""&gt;&lt;img /&gt;&lt;P&gt;For these PersonId, the completion on or after is:&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then, the expected result is:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/5l70yei5bze84nxf1toxx/CountsBasedOn2Facts.pbix?rlkey=xpgl36b50tjdugm1sobjo82be&amp;amp;st=ed3jf5yb&amp;amp;dl=0" target="_self"&gt;link to pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:28:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287253#M170151</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-16T18:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287277#M170155</link>
      <description>&lt;P&gt;What about the other personid's apart from 1,10,13 who have also Completed the program ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:16:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287277#M170155</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-11-16T19:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287282#M170156</link>
      <description>&lt;P&gt;in the example, only the ones that have enrollment in the selected dateId must be considered for the calculation. (2,6,16,17 don't count as complete)&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:37:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287282#M170156</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-16T19:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287458#M170174</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834634" data-lia-user-login="SrMatto" class="lia-mention lia-mention-user"&gt;SrMatto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To calculate the count of programs that are completed on or after the enrollment dates for persons enrolled on selected dates, you can use the following DAX measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;CompletedPrograms =
SUMX(
    SUMMARIZE(
        FILTER(
            FactEnrollment,
            FactEnrollment[IdDate] IN SELECTEDVALUES(FactEnrollment[IdDate])
        ),
        FactEnrollment[PersonId],
        FactEnrollment[IdDate]
    ),
    VAR CurrentPerson = FactEnrollment[PersonId]
    VAR EnrollmentDate = FactEnrollment[IdDate]
    RETURN
        CALCULATE(
            DISTINCTCOUNT(FactCompletion[Program]),
            FactCompletion[PersonId] = CurrentPerson,
            FactCompletion[Degree of completion] = "Complete",
            FactCompletion[CompletionDate] &amp;gt;= EnrollmentDate
        )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Explanation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;SUMMARIZE&lt;/CODE&gt;&lt;/STRONG&gt; creates a table of enrolled persons and their enrollment dates based on the selected &lt;CODE&gt;IdDate&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;SUMX&lt;/CODE&gt;&lt;/STRONG&gt; iterates over each person and enrollment date.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;CALCULATE&lt;/CODE&gt;&lt;/STRONG&gt; counts the distinct programs where:
&lt;UL&gt;
&lt;LI&gt;The &lt;STRONG&gt;PersonId&lt;/STRONG&gt; matches.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Degree of completion&lt;/STRONG&gt; is "Complete".&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;CompletionDate&lt;/STRONG&gt; is on or after the &lt;STRONG&gt;EnrollmentDate&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;The measure sums up the counts to provide the total number of completed programs for the enrolled persons.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Notes:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Ensure your table names (&lt;CODE&gt;FactEnrollment&lt;/CODE&gt;, &lt;CODE&gt;FactCompletion&lt;/CODE&gt;) and column names match those in your data model.&lt;/LI&gt;
&lt;LI&gt;This measure respects the selected enrollment dates and filters the completions accordingly.&lt;/LI&gt;
&lt;LI&gt;No changes to your data model are required.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If this post&lt;STRONG&gt; helps&lt;/STRONG&gt;, please consider &lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank" rel="noopener noreferrer"&gt;LinkedIn&lt;/A&gt;|&lt;A href="https://twitter.com/VahidDMcom" target="_blank" rel="noopener noreferrer"&gt;Twitter&lt;/A&gt;|&lt;A href="https://www.vahiddm.com/" target="_blank" rel="noopener noreferrer"&gt;Blog&amp;nbsp;&lt;/A&gt;|&lt;A href="https://www.youtube.com/@databis" target="_blank" rel="noopener noreferrer"&gt;YouTube&lt;/A&gt;&lt;A href="https://www.youtube.com/@databis" target="_blank" rel="noopener noreferrer"&gt;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 07:01:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287458#M170174</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2024-11-17T07:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287785#M170191</link>
      <description>&lt;P&gt;Hi VahidDm,&lt;BR /&gt;Thanks, but it doesn't work. For start, SELECTEDVALUES doesn't exist in DAX. I changed it to VALUES to get the desired result, though.&lt;BR /&gt;Also, CompletionDate is not part of the data model. (Replaced it with Factcompletion[idDate])&lt;BR /&gt;Still, even with this correction, calculation doesn't gives the correct answer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 21:48:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4287785#M170191</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-17T21:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4288287#M170197</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834634" data-lia-user-login="SrMatto" class="lia-mention lia-mention-user"&gt;SrMatto&lt;/a&gt;&lt;/FONT&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 measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count =
VAR _values =
    SUMMARIZE ( ALLSELECTED ( FactEnrollment ), 'FactEnrollment'[Person ID] )
VAR _vtable =
    FILTER (
        ALL ( FactCompletion ),
        'FactCompletion'[Person ID]
            IN _values
                &amp;amp;&amp;amp; 'FactCompletion'[Degree of Completion] = "Complete"
    )
RETURN
    IF (
        ISINSCOPE ( FactCompletion[Program] ),
        COUNTROWS (
            FILTER ( _vtable, [Program] = SELECTEDVALUE ( 'FactCompletion'[Program] ) )
        ),
        COUNTROWS ( _vtable )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Then drag it to the table visual to replace the original [Count] field so that the result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The PBIX file is attached.&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>Mon, 18 Nov 2024 06:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4288287#M170197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-18T06:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4289199#M170237</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN&gt;Zhengdong Xu,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is very close, but unfortunately, does not generalize.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For instance, in year 2022 semester 1 (20221) yours return 2, but doing it manually gives 1:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:46:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4289199#M170237</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-18T15:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4290253#M170265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834634" data-lia-user-login="SrMatto" class="lia-mention lia-mention-user"&gt;SrMatto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a little confused. If possible, please tell me about the logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's how I understand it:&lt;BR /&gt;___________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;In the first case, the 2 of the sport is made up of 20212 and 20232.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;In the logic, we can get&amp;nbsp;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;8&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;10&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;13&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;15 from&amp;nbsp;FactEnrollment table:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then filter these ID in the&amp;nbsp;FactCompletion table, so that the result is 1(Craftsman)+2(Sport)&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Same to the second case, the result should be 2.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;___________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is something I‘ve misunderstood, please point it out.&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, 19 Nov 2024 05:57:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4290253#M170265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-19T05:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4291470#M170298</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you for the follow up.&lt;BR /&gt;To clarify:&amp;nbsp; I think you might be missing the condition "on or after DateID"&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The first example is correct.&lt;/LI&gt;&lt;LI&gt;The second example, result should be 1 because personID 13 has completed on &lt;STRONG&gt;202&lt;FONT color="#FF0000"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;which is PRIOR to the IdDate filter (set as &lt;STRONG&gt;202&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;, semester 1)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 16:09:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4291470#M170298</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-19T16:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4292601#M170346</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834634" data-lia-user-login="SrMatto" class="lia-mention lia-mention-user"&gt;SrMatto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count =
VAR _Slicer =
    MIN ( 'DimDate'[IdDate] )
VAR _values =
    SUMMARIZE ( ALLSELECTED ( FactEnrollment ), 'FactEnrollment'[Person ID] )
VAR _vtable =
    FILTER (
        ALL ( FactCompletion ),
        'FactCompletion'[Person ID]
            IN _values
                &amp;amp;&amp;amp; 'FactCompletion'[Degree of Completion] = "Complete"
                &amp;amp;&amp;amp; 'FactCompletion'[IdDate] &amp;gt;= _Slicer
    )
RETURN
    IF (
        ISINSCOPE ( FactCompletion[Program] ),
        COUNTROWS (
            FILTER ( _vtable, [Program] = SELECTEDVALUE ( 'FactCompletion'[Program] ) )
        ),
        COUNTROWS ( _vtable )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;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>Wed, 20 Nov 2024 06:59:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4292601#M170346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-20T06:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4293351#M170386</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;It's very cool. Thanks.&lt;BR /&gt;I works almost perfectly!&lt;BR /&gt;Still, I found an glitch. How would you solve the fact that: if the Program is not present in the Enrollment YearSemester, it don't show up?&lt;BR /&gt;Look:&lt;BR /&gt;For IdDate=20202:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Yet, your (almost perfect!) calculation returns:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Which I believe is because "Sport" don't appear in 20202&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 12:52:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4293351#M170386</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-20T12:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4294613#M170448</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834634" data-lia-user-login="SrMatto" class="lia-mention lia-mention-user"&gt;SrMatto&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;Create a new table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = VALUES(FactCompletion[Program])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then change the 'FactCompletion'[Program] into 'Table'[Program] in the table visual:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I did some change on the [Count] measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count =
VAR _Slicer =
    MIN ( 'DimDate'[IdDate] )
VAR _values =
    SUMMARIZE ( ALLSELECTED ( FactEnrollment ), 'FactEnrollment'[Person ID] )
VAR _vtable =
    FILTER (
        ALL ( FactCompletion ),
        'FactCompletion'[Person ID]
            IN _values
                &amp;amp;&amp;amp; 'FactCompletion'[Degree of Completion] = "Complete"
                &amp;amp;&amp;amp; 'FactCompletion'[IdDate] &amp;gt;= _Slicer
    )
RETURN
    IF (
        ISINSCOPE ( 'Table'[Program] ),
        COUNTROWS ( FILTER ( _vtable, [Program] = SELECTEDVALUE ( 'Table'[Program] ) ) ),
        COUNTROWS ( _vtable )
    )
&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;&lt;img /&gt;&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>Thu, 21 Nov 2024 06:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4294613#M170448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T06:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4295976#M170528</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 21:14:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4295976#M170528</guid>
      <dc:creator>SrMatto</dc:creator>
      <dc:date>2024-11-21T21:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Completed Programs for Enrolled Persons on or after filter Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4296104#M170543</link>
      <description>&lt;P&gt;You right, it should be&amp;nbsp;SELECTEDVALUE &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 23:56:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Completed-Programs-for-Enrolled-Persons-on-or-after/m-p/4296104#M170543</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2024-11-21T23:56:36Z</dc:date>
    </item>
  </channel>
</rss>

