<?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: Last value in row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2317260#M57764</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352239" data-lia-user-login="MM1984" class="lia-mention lia-mention-user"&gt;MM1984&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, here's my solution.&lt;/P&gt;
&lt;P&gt;1.In Power Query, select all date columns at the same time, then click Unpivot Columns.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Get the following table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.Add an index column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3.Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last date= 
MAXX (
    FILTER (
        'Table',
        'Table'[Index]
            = MAXX (
                FILTER (
                    ALL ( 'Table' ),
                    'Table'[PrimaryKey] = MAX ( 'Table'[PrimaryKey] )
                        &amp;amp;&amp;amp; 'Table'[Value] &amp;lt;&amp;gt; BLANK ()
                ),
                'Table'[Index]
            )
    ),
    'Table'[Value]
)
&lt;/LI-CODE&gt;
&lt;P&gt;4.Put PrimaryKey and the measure in a table visual, get the expected result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Feb 2022 09:04:00 GMT</pubDate>
    <dc:creator>v-yanjiang-msft</dc:creator>
    <dc:date>2022-02-03T09:04:00Z</dc:date>
    <item>
      <title>Last value in row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2308211#M57284</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a function to get the last value in a row?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example PrimaryKey / Date1/ Date2/ Date3/ Date4 xx1 / 28.01.2020 / 01.01.2020 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xx2 / 02.02.1922/ 10.08.2022/ 03.04.2011 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DAX function last value for xx1 = 01.01.2020 For xx2 = 03.04.2011 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;marius&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 17:25:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2308211#M57284</guid>
      <dc:creator>MM1984</dc:creator>
      <dc:date>2022-01-28T17:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Last value in row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2308322#M57293</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;There isn't a direct function. In these kind of cases I would unpivot the data and use LASTNONBLANK while considering the key as a filter.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 18:21:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2308322#M57293</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-28T18:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Last value in row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2317260#M57764</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352239" data-lia-user-login="MM1984" class="lia-mention lia-mention-user"&gt;MM1984&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, here's my solution.&lt;/P&gt;
&lt;P&gt;1.In Power Query, select all date columns at the same time, then click Unpivot Columns.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Get the following table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.Add an index column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3.Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last date= 
MAXX (
    FILTER (
        'Table',
        'Table'[Index]
            = MAXX (
                FILTER (
                    ALL ( 'Table' ),
                    'Table'[PrimaryKey] = MAX ( 'Table'[PrimaryKey] )
                        &amp;amp;&amp;amp; 'Table'[Value] &amp;lt;&amp;gt; BLANK ()
                ),
                'Table'[Index]
            )
    ),
    'Table'[Value]
)
&lt;/LI-CODE&gt;
&lt;P&gt;4.Put PrimaryKey and the measure in a table visual, get the expected result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 09:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-value-in-row/m-p/2317260#M57764</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-02-03T09:04:00Z</dc:date>
    </item>
  </channel>
</rss>

