<?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: Help with Formula to return a value for the max date for each unique ID in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2880608#M93229</link>
    <description>&lt;P&gt;One more question. I am trying to put this into a matrix where i can view the results by customer, product group, or all of the individual material results from the calculation you have provided.&amp;nbsp; Currently, if i use the planned qty formula you provided and i collapse from material up one level to customer/brand, i don't get a sum of each of the calculated planned qtys. In the example below, i'd expect the result for 01-Jul to be 1,425, not 150. How can i achieve that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2022 15:12:03 GMT</pubDate>
    <dc:creator>lpost1214</dc:creator>
    <dc:date>2022-11-02T15:12:03Z</dc:date>
    <item>
      <title>Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2875255#M92903</link>
      <description>&lt;P&gt;I have historical forecast data for all forecated materials and below is an example of one. I would like to create a formula to return the 'planned qty' for the latest 'date of last change' for each 'key'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Once i have this value i am looking to put in a matrix format. i.e. below 202209 it should show 484, 202210 should show 500, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 18:43:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2875255#M92903</guid>
      <dc:creator>lpost1214</dc:creator>
      <dc:date>2022-10-31T18:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2876047#M92946</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do you want it as a calculated column or a measure?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 04:31:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2876047#M92946</guid>
      <dc:creator>lukiz84</dc:creator>
      <dc:date>2022-11-01T04:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2877236#M92992</link>
      <description>&lt;P&gt;I think i'd like to have it calculated as a measure, but i honestly get confused about when is the correct instance to use each. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 12:34:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2877236#M92992</guid>
      <dc:creator>lpost1214</dc:creator>
      <dc:date>2022-11-01T12:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2877502#M93007</link>
      <description>&lt;P&gt;Ah ok, yeah, measure makes sense, should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PlannedQty =
   CALCULATE(
      MAX(Forecast[Planned quantity_PLNMG]),
      FILTER(
         Forecast,
         Forecast[Date of Last Change_LAEDA] = MAX(Forecast[Date of Last Change_LAEDA])
      )
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 14:43:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2877502#M93007</guid>
      <dc:creator>lukiz84</dc:creator>
      <dc:date>2022-11-01T14:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2878139#M93066</link>
      <description>&lt;P&gt;Thank you, this worked. How would i calculate it as a column? I have a similar scenario that i think may work better by adding a column.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 19:47:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2878139#M93066</guid>
      <dc:creator>lpost1214</dc:creator>
      <dc:date>2022-11-01T19:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2878990#M93112</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="464646" data-lia-user-login="lpost1214" class="lia-mention lia-mention-user"&gt;lpost1214&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Column:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
VAR _maxdate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( 'Table', [Key] = EARLIER ( 'Table'[Key] ) )
    )
RETURN
    CALCULATE (
        MAX ( 'Table'[Planned] ),
        FILTER ( 'Table', [Key] = EARLIER ( 'Table'[Key] ) &amp;amp;&amp;amp; [Date] = _maxdate )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 06:07:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2878990#M93112</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-11-02T06:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula to return a value for the max date for each unique ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2880608#M93229</link>
      <description>&lt;P&gt;One more question. I am trying to put this into a matrix where i can view the results by customer, product group, or all of the individual material results from the calculation you have provided.&amp;nbsp; Currently, if i use the planned qty formula you provided and i collapse from material up one level to customer/brand, i don't get a sum of each of the calculated planned qtys. In the example below, i'd expect the result for 01-Jul to be 1,425, not 150. How can i achieve that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 15:12:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Formula-to-return-a-value-for-the-max-date-for-each/m-p/2880608#M93229</guid>
      <dc:creator>lpost1214</dc:creator>
      <dc:date>2022-11-02T15:12:03Z</dc:date>
    </item>
  </channel>
</rss>

