<?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: Need help to get the latest value based on latest update date. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3763201#M146849</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704773" data-lia-user-login="jasonyy" class="lia-mention lia-mention-user"&gt;jasonyy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please &lt;SPAN&gt;try the following methods and check if they can solve your problem:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the simple table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Create a new measure to filter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;STD_COST = 
VAR latest_d = CALCULATE(MAX([Lat_update_date]), ALLEXCEPT('Table', 'Table'[Organization code]))
RETURN
CALCULATE(
    SUM('Table'[ITEM cost]), FILTER('Table', 'Table'[Lat_update_date] = latest_d)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Drag the measure into the table visual. The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 10:02:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-14T10:02:17Z</dc:date>
    <item>
      <title>Need help to get the latest value based on latest update date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3759540#M146671</link>
      <description>&lt;P&gt;Hi, I need help / advice on how to get the latest standard cost value based on last update date for different country.&lt;/P&gt;&lt;P&gt;I have try Calculate method, but not able to get the desired outcome on standard cost. Please help to advise what can i do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the sample table data.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This are the desired preferred outcome in power bi desktop, but i'm not able to get the latest value for standard cost.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 05:34:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3759540#M146671</guid>
      <dc:creator>jasonyy</dc:creator>
      <dc:date>2024-03-13T05:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to get the latest value based on latest update date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3759573#M146672</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704773" data-lia-user-login="jasonyy" class="lia-mention lia-mention-user"&gt;jasonyy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure but try below code for measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;STD_COST=
var a = maxx(
          filter(
            all(table),
            table[item_number]=max(table[item_number])&amp;amp;&amp;amp;
            table[organization_code]=max(table[organization_code])&amp;amp;&amp;amp;
            table[currency]=max(currency)
          ),
          table[last_update_date]
        )
return
sumx(
  filter(
    table,
    table[last_update_date]=a
  ),
  table[item_cost]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 05:50:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3759573#M146672</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-03-13T05:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to get the latest value based on latest update date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3759728#M146679</link>
      <description>&lt;P&gt;Hi Dangar,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion. I have tried it out, but not able to get the desired outcome.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the solution provided, it seem that it aggregate the value up and display accordingly as per below print screen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 06:52:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3759728#M146679</guid>
      <dc:creator>jasonyy</dc:creator>
      <dc:date>2024-03-13T06:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to get the latest value based on latest update date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3763201#M146849</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704773" data-lia-user-login="jasonyy" class="lia-mention lia-mention-user"&gt;jasonyy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please &lt;SPAN&gt;try the following methods and check if they can solve your problem:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the simple table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Create a new measure to filter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;STD_COST = 
VAR latest_d = CALCULATE(MAX([Lat_update_date]), ALLEXCEPT('Table', 'Table'[Organization code]))
RETURN
CALCULATE(
    SUM('Table'[ITEM cost]), FILTER('Table', 'Table'[Lat_update_date] = latest_d)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Drag the measure into the table visual. The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 10:02:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3763201#M146849</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-14T10:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to get the latest value based on latest update date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3763220#M146850</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704773" data-lia-user-login="jasonyy" class="lia-mention lia-mention-user"&gt;jasonyy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try updated code it might work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;STD_COST=
var a = maxx(
          filter(
            all(table),
            table[item_number]=max(table[item_number])&amp;amp;&amp;amp;
            table[organization_code]=max(table[organization_code])&amp;amp;&amp;amp;
            table[currency]=max(currency)
          ),
          table[last_update_date]
        )
return
sumx(
  filter(
    all(table[last_update_date], table[item_cost]),
    table[last_update_date]=a
  ),
  table[item_cost]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Mar 2024 10:07:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-the-latest-value-based-on-latest-update-date/m-p/3763220#M146850</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-03-14T10:07:52Z</dc:date>
    </item>
  </channel>
</rss>

