<?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: DAX (add column) identify the max date of grouping in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973728#M99495</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472962" data-lia-user-login="mlovejoy" class="lia-mention lia-mention-user"&gt;mlovejoy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Result =&lt;BR /&gt;MAXX (&lt;BR /&gt;CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Criteria] ) ),&lt;BR /&gt;'Table'[Date]&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 15:37:23 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-12-16T15:37:23Z</dc:date>
    <item>
      <title>DAX (add column) identify the max date of grouping</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973604#M99487</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problematic is straight forward I need to add DAX column. I have cirteria x, y and z. I can identify duplicate with this formula:&lt;/P&gt;&lt;P&gt;Duplicates count =&lt;/P&gt;&lt;P&gt;var x= Criteria&lt;BR /&gt;return&lt;BR /&gt;COUNTROWS(FILTER(Table,criteria = x)) this give me the number of duplicates (grouping).&lt;/P&gt;&lt;P&gt;Then for every duplicates I need to put a 1 to the most recent date of the grouping and a 0 to the oldest.&lt;/P&gt;&lt;P&gt;Is that even possible to do in DAX add Column?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Mark Lovejoy&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 14:35:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973604#M99487</guid>
      <dc:creator>mlovejoy</dc:creator>
      <dc:date>2022-12-16T14:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX (add column) identify the max date of grouping</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973655#M99490</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;You should be able to do something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Most recent date = 
VAR __IsDuplicate = //Checks if row has a duplicate. If all rows has duplicates, this is not needed.
    If('Table'[Duplicates]&amp;gt;0,TRUE(),FALSE())
    
VAR __MaxDate =  //Finds the most recent (MAX()) date for current criteria
    CALCULATE(
        max('Table'[Date]),
        FILTER(all('Table'),'Table'[Criteria] = EARLIER('Table'[Criteria])
        )
    )
return
if(__IsDuplicate,   //If current row is a duplicate
    if('Table'[Date] = __MaxDate,  //And current row date is the most recent date for this criteria
        1, //return 1
        0  //else return 0
    ),
    0 else return 0
)&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:00:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973655#M99490</guid>
      <dc:creator>TomasAndersson</dc:creator>
      <dc:date>2022-12-16T15:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX (add column) identify the max date of grouping</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973728#M99495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472962" data-lia-user-login="mlovejoy" class="lia-mention lia-mention-user"&gt;mlovejoy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Result =&lt;BR /&gt;MAXX (&lt;BR /&gt;CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Criteria] ) ),&lt;BR /&gt;'Table'[Date]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:37:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-add-column-identify-the-max-date-of-grouping/m-p/2973728#M99495</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-16T15:37:23Z</dc:date>
    </item>
  </channel>
</rss>

