<?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: Value for maxdate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2434471#M64937</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346472" data-lia-user-login="daliux" class="lia-mention lia-mention-user"&gt;daliux&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I created a sample with the data you provided . &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Create a measure to return the Status with latest date .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _maxdate=CALCULATE(MAX('Table'[logged_at]),ALLEXCEPT('Table','Table'[Id]))
var _status=CALCULATE(MAX('Table'[Status]),FILTER('Table','Table'[Id]=MAX('Table'[Id]) &amp;amp;&amp;amp; 'Table'[logged_at]=_maxdate))
return _status&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then put the measure in your table visual , you will get a result like below .&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I have attached my pbix file , you can refer to it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Ailsa Tao&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2022 05:21:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-04-06T05:21:06Z</dc:date>
    <item>
      <title>Value for maxdate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2429298#M64618</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I have items with dates of status change. I need a column for last status of selected period. I need dax formula for a values of staus on max logged_at date&amp;nbsp; for each item (id). Result sould be like this: in 1 case it should be 'pau', in 2 case - 'pau' too. Could someone help me, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 11:41:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2429298#M64618</guid>
      <dc:creator>daliux</dc:creator>
      <dc:date>2022-03-31T11:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Value for maxdate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2429635#M64631</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346472" data-lia-user-login="daliux" class="lia-mention lia-mention-user"&gt;daliux&lt;/a&gt; , You can create status measure like &lt;/P&gt;
&lt;P&gt;Measure = &lt;BR /&gt;VAR __id = MAX ('Table'[id] )&lt;BR /&gt;VAR __Version_Id = CALCULATE ( MAX('Table'[Logged_at] ), ALLSELECTED ('Table' ), 'Table'[id] = __id ) &lt;BR /&gt;RETURN CALCULATE ( MAX ('Table'[Status] ), VALUES ('Table'[id] ),'Table'[id] = __id,'Table'[Logged_at] = __Version_Id )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and use that in visual&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 13:36:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2429635#M64631</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-03-31T13:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Value for maxdate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2434471#M64937</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346472" data-lia-user-login="daliux" class="lia-mention lia-mention-user"&gt;daliux&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I created a sample with the data you provided . &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Create a measure to return the Status with latest date .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _maxdate=CALCULATE(MAX('Table'[logged_at]),ALLEXCEPT('Table','Table'[Id]))
var _status=CALCULATE(MAX('Table'[Status]),FILTER('Table','Table'[Id]=MAX('Table'[Id]) &amp;amp;&amp;amp; 'Table'[logged_at]=_maxdate))
return _status&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then put the measure in your table visual , you will get a result like below .&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I have attached my pbix file , you can refer to it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Ailsa Tao&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 05:21:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Value-for-maxdate/m-p/2434471#M64937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-06T05:21:06Z</dc:date>
    </item>
  </channel>
</rss>

