<?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: Return the value based on earliest date creation and by group in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3854797#M150613</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;- I want to sincerely thank you both for your help and support!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I learned a ton from both of your recommendations and was able to implement it to our business problem!&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2024 21:40:42 GMT</pubDate>
    <dc:creator>Rondel</dc:creator>
    <dc:date>2024-04-19T21:40:42Z</dc:date>
    <item>
      <title>Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851021#M150481</link>
      <description>&lt;P&gt;Hello PBI Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 3 columns (Group, Value Entered, Created On).&amp;nbsp; I want to create a 4th column (Original date) based on the earliest date creation by group.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Group&lt;/TD&gt;&lt;TD&gt;Value Entered&lt;/TD&gt;&lt;TD&gt;Created On&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Original Date&lt;/P&gt;&lt;P&gt;(*Desired Column)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;x&lt;/TD&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;TD&gt;4/11/2024&lt;/TD&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;x&lt;/TD&gt;&lt;TD&gt;3/4/2024&lt;/TD&gt;&lt;TD&gt;4/12/2024&lt;/TD&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;x&lt;/TD&gt;&lt;TD&gt;2/2/2024&lt;/TD&gt;&lt;TD&gt;5/13/2024&lt;/TD&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;TD&gt;3/2/2024&lt;/TD&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;TD&gt;3/2/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;TD&gt;1/24/2024&lt;/TD&gt;&lt;TD&gt;1/2/2024&lt;/TD&gt;&lt;TD&gt;3/2/2024&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 18 Apr 2024 20:55:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851021#M150481</guid>
      <dc:creator>Rondel</dc:creator>
      <dc:date>2024-04-18T20:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851106#M150484</link>
      <description>&lt;P&gt;Your sample data is inconsistent with your request.&amp;nbsp; Which column is "earliest date creation"&amp;nbsp; based on?&amp;nbsp; Why not 1/24/2024 for group y ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 22:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851106#M150484</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-18T22:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851116#M150485</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the column [Created On] would be the system generated date.&lt;/P&gt;&lt;P&gt;1/24/2024 would not be for group y since it was entered on 1/2/2024 (oldest date for group y is&amp;nbsp; 1/1/2024).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 22:16:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851116#M150485</guid>
      <dc:creator>Rondel</dc:creator>
      <dc:date>2024-04-18T22:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851153#M150487</link>
      <description>&lt;P&gt;Please explain how you arrive at 3/2/2024 for group y.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 22:35:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851153#M150487</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-18T22:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851161#M150488</link>
      <description>&lt;P&gt;Sure thing -&lt;/P&gt;&lt;P&gt;3/2/2024 is the date value entered by an operator.&amp;nbsp; This same value was created (system generated) on 1/1/2024.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3/2/2024 is the [Original Date] because the following day (1/2/2024), they changed the date from 3/2/2024 to 1/24/2024.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 22:41:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851161#M150488</guid>
      <dc:creator>Rondel</dc:creator>
      <dc:date>2024-04-18T22:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851171#M150489</link>
      <description>&lt;P&gt;ah, got it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqlDSUTLUN9Q3MjAyATJN9A2h7FgdiKSxvgmSpBGqJJALkzTVNzRGSFaCdcIl4TbA5IBcE4QkzNRYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Group = _t, #"Value Entered" = _t, #"Created On" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Group", type text}, {"Value Entered", type date}, {"Created On", type date}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Group"}, {{"Rows", each _, type table [Group=nullable text, Value Entered=nullable date, Created On=nullable date]}, {"Min Created", each List.Min([Created On]), type nullable date}}),
    #"Expanded Rows" = Table.ExpandTableColumn(#"Grouped Rows", "Rows", {"Value Entered", "Created On"}, {"Value Entered", "Created On"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Rows", "Original Date", (k)=&amp;gt; Table.SelectRows(#"Expanded Rows", each [Group]=k[Group] and [Created On]=k[Min Created]){0}[Value Entered], type date),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Group", "Value Entered", "Created On", "Original Date"})
in
    #"Removed Other Columns"&lt;/LI-CODE&gt;
&lt;P&gt;How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 22:57:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851171#M150489</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-18T22:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851187#M150490</link>
      <description>&lt;P&gt;Thank you for the quick replies! - ill execute this once I get back to my desk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will keep you posted!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 23:07:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851187#M150490</guid>
      <dc:creator>Rondel</dc:creator>
      <dc:date>2024-04-18T23:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851571#M150501</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you mind explaining what this part of the code does?&amp;nbsp; I can't seem to make it work on my end:&amp;nbsp;&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;Table.AddColumn(#"Expanded Rows", "Original Date", (k)=&amp;gt; Table.SelectRows(#"Expanded Rows", each [Group]=k[Group] and [Created On]=k[Min Created]){0}[Value Entered], type date)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 03:34:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3851571#M150501</guid>
      <dc:creator>Rondel</dc:creator>
      <dc:date>2024-04-19T03:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3853059#M150536</link>
      <description>&lt;P&gt;Thanks for the reply from&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp; , please allow me to provide another insight:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="345941" data-lia-user-login="Rondel" class="lia-mention lia-mention-user"&gt;Rondel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Original Date =
var _mindate=
MINX(
    FILTER(ALL('Table'),
    'Table'[Group]=EARLIER('Table'[Group])),[Created On])
return
MINX(
    FILTER(ALL('Table'),
    'Table'[Created On]=_mindate),'Table'[Value Entered])&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&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;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 09:06:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3853059#M150536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-19T09:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3853497#M150556</link>
      <description>&lt;P&gt;You wanted the first listed date in the group. The code filters the previous result to return all rows in the same group and then grabs the column value from the first row.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 11:24:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3853497#M150556</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-19T11:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Return the value based on earliest date creation and by group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3854797#M150613</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;- I want to sincerely thank you both for your help and support!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I learned a ton from both of your recommendations and was able to implement it to our business problem!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 21:40:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-the-value-based-on-earliest-date-creation-and-by-group/m-p/3854797#M150613</guid>
      <dc:creator>Rondel</dc:creator>
      <dc:date>2024-04-19T21:40:42Z</dc:date>
    </item>
  </channel>
</rss>

