<?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: Calculate the name column with most recent date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603165#M32154</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280518" data-lia-user-login="paulomoreira" class="lia-mention lia-mention-user"&gt;paulomoreira&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;DAX doesn't support retrieving the column name or any meta data, you can do it in Power Query if you like.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Jan 2021 11:54:31 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2021-01-16T11:54:31Z</dc:date>
    <item>
      <title>Calculate the name column with most recent date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603124#M32149</link>
      <description>&lt;P&gt;Hi have 2 columns, how can i know the name of column and date for most recent date for the product.&lt;/P&gt;&lt;P&gt;Exemple: product 1 is column B with 20-07-2020&lt;/P&gt;&lt;P&gt;product 2 is column A with 3-2-2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10-07-2020&lt;/TD&gt;&lt;TD&gt;20-07-2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3-2-2019&lt;/TD&gt;&lt;TD&gt;01-12-2018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 16 Jan 2021 11:19:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603124#M32149</guid>
      <dc:creator>paulomoreira</dc:creator>
      <dc:date>2021-01-16T11:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the name column with most recent date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603165#M32154</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280518" data-lia-user-login="paulomoreira" class="lia-mention lia-mention-user"&gt;paulomoreira&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;DAX doesn't support retrieving the column name or any meta data, you can do it in Power Query if you like.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 11:54:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603165#M32154</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-01-16T11:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the name column with most recent date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603739#M32169</link>
      <description>&lt;P&gt;How can i do with M?&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 09:31:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603739#M32169</guid>
      <dc:creator>paulomoreira</dc:creator>
      <dc:date>2021-01-17T09:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the name column with most recent date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603798#M32175</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280518" data-lia-user-login="paulomoreira" class="lia-mention lia-mention-user"&gt;paulomoreira&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Create a blank Query, go to the Advanced Editor, clear the existing code, and paste the codes give below and follow the steps.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI00DUw1zUyMDIAcowQnFidaCUjoJCxrhFQwNASyDQw1DUEcyyUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Product = _t, A = _t, B = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", type date}, {"B", type date}},"en-gb"),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Recent Date", each List.Max({[A],[B]})),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Recent Date", type date}}),
    #"Added Custom1" = Table.AddColumn(#"Changed Type1", "Column Name", each let 
  i = {[A],[B]} 
in
  Table.ColumnNames(#"Changed Type")
  { List.PositionOf(i,[Recent Date]) + 1})
in
    #"Added Custom1"&lt;/LI-CODE&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;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 11:37:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-name-column-with-most-recent-date/m-p/1603798#M32175</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-01-17T11:37:14Z</dc:date>
    </item>
  </channel>
</rss>

