<?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: Get a list with only one individual with the latest next appointment date. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4257392#M168681</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627412" data-lia-user-login="Motomoto" class="lia-mention lia-mention-user"&gt;Motomoto&lt;/a&gt;&amp;nbsp;，&amp;nbsp;Selva-Salimi， thank you for your prompt reply!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To meet your requirements, follow these steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;: First, find the maximum&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;HIV-ART Next follow-up date&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for each&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Program ID&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;MAX&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;: Then, for the rows with the same maximum&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;HIV-ART Next follow-up date&lt;/CODE&gt;, find the corresponding maximum&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Date of visit&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;MAX&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3&lt;/STRONG&gt;: Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;DISTINCT&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to ensure that the final result contains unique rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;UniqueProgramData = 
DISTINCT(
    FILTER(
        'Table',
        'Table'[HIV-ART Next follow-up date] = 
        CALCULATE(
            MAX('Table'[HIV-ART Next follow-up date]),
            ALLEXCEPT('Table', 'Table'[Program ID])
        ) &amp;amp;&amp;amp;
        'Table'[Date of visit] = 
        CALCULATE(
            MAX('Table'[Date of visit]),
            ALLEXCEPT('Table', 'Table'[Program ID], 'Table'[HIV-ART Next follow-up date])
        )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Result for your reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joyce&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 05:21:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-10-25T05:21:47Z</dc:date>
    <item>
      <title>Get a list with only one individual with the latest next appointment date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4254543#M168535</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need help with creating a new table that will list only people with the latest next appointment date information of each individual.No duplicates should apperar in the new table.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 14:01:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4254543#M168535</guid>
      <dc:creator>Motomoto</dc:creator>
      <dc:date>2024-10-23T14:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get a list with only one individual with the latest next appointment date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4254600#M168541</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627412" data-lia-user-login="Motomoto" class="lia-mention lia-mention-user"&gt;Motomoto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can create this table as follows: (go modelling &amp;gt;&amp;gt; new table)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;summarize( your_table , and write the name of any column you want to appear in this table (note that the values in these columns should be unique per person) , "latest_date" , max (nex_followup_date))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post helps, then I would appreciate a thumbs up&amp;nbsp;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;mark it as the solution&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 14:38:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4254600#M168541</guid>
      <dc:creator>Selva-Salimi</dc:creator>
      <dc:date>2024-10-23T14:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get a list with only one individual with the latest next appointment date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4256170#M168612</link>
      <description>&lt;P&gt;Hello Selva. Thank you very much, the solution is very helpful, but i still have an issue as i still get some duplicates especially if the next follow up dates are within the same month. Thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 10:26:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4256170#M168612</guid>
      <dc:creator>Motomoto</dc:creator>
      <dc:date>2024-10-24T10:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get a list with only one individual with the latest next appointment date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4256202#M168615</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627412" data-lia-user-login="Motomoto" class="lia-mention lia-mention-user"&gt;Motomoto&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the next follow up date should just used in max function. if so, would you please share the measure you have written.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 10:54:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4256202#M168615</guid>
      <dc:creator>Selva-Salimi</dc:creator>
      <dc:date>2024-10-24T10:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get a list with only one individual with the latest next appointment date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4257392#M168681</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627412" data-lia-user-login="Motomoto" class="lia-mention lia-mention-user"&gt;Motomoto&lt;/a&gt;&amp;nbsp;，&amp;nbsp;Selva-Salimi， thank you for your prompt reply!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To meet your requirements, follow these steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;: First, find the maximum&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;HIV-ART Next follow-up date&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for each&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Program ID&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;MAX&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;: Then, for the rows with the same maximum&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;HIV-ART Next follow-up date&lt;/CODE&gt;, find the corresponding maximum&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Date of visit&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;MAX&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3&lt;/STRONG&gt;: Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;DISTINCT&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to ensure that the final result contains unique rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;UniqueProgramData = 
DISTINCT(
    FILTER(
        'Table',
        'Table'[HIV-ART Next follow-up date] = 
        CALCULATE(
            MAX('Table'[HIV-ART Next follow-up date]),
            ALLEXCEPT('Table', 'Table'[Program ID])
        ) &amp;amp;&amp;amp;
        'Table'[Date of visit] = 
        CALCULATE(
            MAX('Table'[Date of visit]),
            ALLEXCEPT('Table', 'Table'[Program ID], 'Table'[HIV-ART Next follow-up date])
        )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Result for your reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joyce&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 05:21:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4257392#M168681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-25T05:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get a list with only one individual with the latest next appointment date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4257474#M168685</link>
      <description>&lt;P&gt;This solved, my problem. thank you all.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 06:14:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-list-with-only-one-individual-with-the-latest-next/m-p/4257474#M168685</guid>
      <dc:creator>Motomoto</dc:creator>
      <dc:date>2024-10-25T06:14:03Z</dc:date>
    </item>
  </channel>
</rss>

