<?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 - help with last date based on multiple distinct keys in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2889048#M93726</link>
    <description>&lt;P&gt;You can create the following new measure and add it to your visual.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Latest payment = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payments&lt;/SPAN&gt;&lt;SPAN&gt;[Payment date]&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;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payments&lt;/SPAN&gt;&lt;SPAN&gt;[Payment date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The filter condition will allow finding the maximum payment date but keeping the Invoice_key to be the same.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Br,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Magnus&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 07 Nov 2022 10:46:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-11-07T10:46:43Z</dc:date>
    <item>
      <title>DAX - help with last date based on multiple distinct keys</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2888940#M93719</link>
      <description>&lt;P&gt;Hi PowerBi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Powerbi and DAX, I am trying to solve an issue of selecting the MAX/Last date from a column (payment date) where there were multiple same numbers (Invoice Key column). if there is no multiple keys then just display the 1 payment date. i get the concept of what needs to be done but i just cant get my head wrapped around how to partition the distinct invoice keys and then use that to find the max/last date from that partition. any help or advice is really appreciated. thank you!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Mon, 07 Nov 2022 10:05:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2888940#M93719</guid>
      <dc:creator>deng2431</dc:creator>
      <dc:date>2022-11-07T10:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - help with last date based on multiple distinct keys</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2889048#M93726</link>
      <description>&lt;P&gt;You can create the following new measure and add it to your visual.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Latest payment = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payments&lt;/SPAN&gt;&lt;SPAN&gt;[Payment date]&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;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payments&lt;/SPAN&gt;&lt;SPAN&gt;[Payment date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The filter condition will allow finding the maximum payment date but keeping the Invoice_key to be the same.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Br,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Magnus&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Nov 2022 10:46:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2889048#M93726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-07T10:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - help with last date based on multiple distinct keys</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2889062#M93727</link>
      <description>&lt;P&gt;Hi Magnus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response, i just so happen to came across a solution to my issues earlier using the below query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Payment date (Final) = &lt;/SPAN&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(Payments[Payment date]&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;allexcept&lt;/SPAN&gt;&lt;SPAN&gt;(Payments&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Payments&lt;/SPAN&gt;&lt;SPAN&gt;[Invoice_key]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;which works exactly what i wanted, i have tried your solution as well but it doesnt take into consideration of finding the max date in the same set of Invoice keys.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thank for your time with this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Nov 2022 10:58:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-with-last-date-based-on-multiple-distinct-keys/m-p/2889062#M93727</guid>
      <dc:creator>deng2431</dc:creator>
      <dc:date>2022-11-07T10:58:26Z</dc:date>
    </item>
  </channel>
</rss>

