<?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: Filtering for most recent date in a group in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727334#M145201</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="695429" data-lia-user-login="PartyFish88" class="lia-mention lia-mention-user"&gt;PartyFish88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the visual, are all attributes from same table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If possible please share pbix file with all sensitive data removed(or with mockup data).&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 11:24:40 GMT</pubDate>
    <dc:creator>talespin</dc:creator>
    <dc:date>2024-02-27T11:24:40Z</dc:date>
    <item>
      <title>Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3720316#M144856</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to only show the line that has the most recent RoleLastUpdate (see Image) for each distinct RoleID..&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I've tried this solution, however this only shows the most recent date for the whole table.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-table-for-rows-showing-the-max-date-per-group/m-p/3218237#M117542" target="_blank"&gt;Solved: Filtering table for rows showing the max date per ... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This solution is supposed to put a '1' next to the latest date, which can then be filtered on, however it's putting a one next to every date (image - last column). I've checked the example from the solution and mine looks the same, aside from the table/column names.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Filter-a-Table-To-Show-Only-Most-Recent-Date-For-Each/td-p/1027595" target="_blank"&gt;Solved: How to Filter a Table To Show Only Most Recent Dat... - Microsoft Fabric Community&lt;/A&gt;&lt;BR /&gt;The only filter I have on is for specific users, which shouldn't effect results as they're grouped by RoleID, and in this case the same user is attached to each.&lt;BR /&gt;DAX used.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MostRecentUpdateFilter2&lt;/SPAN&gt;&lt;SPAN&gt;.0&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;maxdate&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Legal IR35RoleReview'&lt;/SPAN&gt;&lt;SPAN&gt;[RoleLastUpdate]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Legal IR35RoleReview'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Legal IR35RoleReview'&lt;/SPAN&gt;&lt;SPAN&gt;[RoleID]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Legal IR35RoleReview'&lt;/SPAN&gt;&lt;SPAN&gt;[RoleLastUpdate]&lt;/SPAN&gt;&lt;SPAN&gt;) = &lt;/SPAN&gt;&lt;SPAN&gt;maxdate&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;() )&lt;BR /&gt;&lt;BR /&gt;Can anyone see where it's going wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Feb 2024 16:25:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3720316#M144856</guid>
      <dc:creator>PartyFish88</dc:creator>
      <dc:date>2024-02-23T16:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3720858#M144881</link>
      <description>&lt;P&gt;Instead of ALLSELECTED use REMOVEFILTERS on the date column.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2024 00:13:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3720858#M144881</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-24T00:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3722471#M144974</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="695429" data-lia-user-login="PartyFish88" class="lia-mention lia-mention-user"&gt;PartyFish88&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;As lbendlin said, using the REMOVEFILTERS function is a viable approach. Below is my answer.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It seems you’re on the right track with your DAX formula, but there’s a small adjustment needed to achieve the desired result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here’s the revised DAX measure:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MostRecentUpdateFilter2.0 =
VAR maxdate =
    CALCULATE(
        MAX('Legal IR35RoleReview'[RoleLastUpdate]),
        ALLSELECTED('Legal IR35RoleReview')
    )
RETURN
    IF(
        'Legal IR35RoleReview'[RoleLastUpdate] = maxdate,
        1,
        BLANK()
    )
&lt;/LI-CODE&gt;
&lt;P&gt;By doing so, we’re now comparing the date for each row against the maximum date across all rows, regardless of the specific RoleID. This should correctly mark only the most recent date with a ‘1’ in your result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 01:53:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3722471#M144974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-26T01:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3723696#M145015</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I've tried both of your solutions, unfortunately they only bring back the most recent RoleUpdate (last night).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to bring in the most recent Role update for each unique RoleID &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 11:18:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3723696#M145015</guid>
      <dc:creator>PartyFish88</dc:creator>
      <dc:date>2024-02-26T11:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3724818#M145061</link>
      <description>&lt;P&gt;In your version 4.0 what's the purpose of the VALUES filter?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 18:27:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3724818#M145061</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T18:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3726921#M145175</link>
      <description>&lt;P&gt;The VALUES filter is supposed to group events/updates together by their RoleID, this being a unique identifier. The rest of the DAX is supposed to put a '1' next to the most recent RoleLastUpdate which can then be filtered on, showing only the most recent RoleUpdate for each RoleID&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I say supposed to, DAX isn't really my fortay . . . yet&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 09:34:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3726921#M145175</guid>
      <dc:creator>PartyFish88</dc:creator>
      <dc:date>2024-02-27T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727125#M145185</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="695429" data-lia-user-login="PartyFish88" class="lia-mention lia-mention-user"&gt;PartyFish88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this measure, I just typed it in notepad, please check syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure =&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR _RoleLastUpdate = SELECTEDVALUE('Legal IR35RoleReview'[RoleLastUpdate])&lt;BR /&gt;VAR _RoleID = SELECTEDVALUE('Legal IR35RoleReview'[RoleID])&lt;BR /&gt;VAR maxdate =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX ('Legal IR35RoleReview'[RoleLastUpdate]),&lt;BR /&gt;REMOVEFILTERS('Legal IR35RoleReview'),&lt;BR /&gt;'Legal IR35RoleReview'[RoleID] = _RoleID&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;RETURN IF( _RoleLastUpdate = maxdate, 1, BLANK() )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 10:16:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727125#M145185</guid>
      <dc:creator>talespin</dc:creator>
      <dc:date>2024-02-27T10:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727245#M145195</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="678168" data-lia-user-login="talespin" class="lia-mention lia-mention-user"&gt;talespin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for your solution, unfortunately it's putting a '1' next to each entry rather than those with the most recent dates (see image).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 10:51:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727245#M145195</guid>
      <dc:creator>PartyFish88</dc:creator>
      <dc:date>2024-02-27T10:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering for most recent date in a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727334#M145201</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="695429" data-lia-user-login="PartyFish88" class="lia-mention lia-mention-user"&gt;PartyFish88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the visual, are all attributes from same table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If possible please share pbix file with all sensitive data removed(or with mockup data).&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 11:24:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-for-most-recent-date-in-a-group/m-p/3727334#M145201</guid>
      <dc:creator>talespin</dc:creator>
      <dc:date>2024-02-27T11:24:40Z</dc:date>
    </item>
  </channel>
</rss>

