title: Overlapping Time Series Data in Power Query
body: <p>Hello all you power query wizards,</p>
  <p>I have a similar question to this question: <a href="https://stackoverflow.com/questions/51783554/timeseries-with-overlapping-timeframes-using-just-the-most-recent-in-excel-powe">Timeseries with overlapping timeframes, using just the most recent in Excel Power Query</a>, except my column isn't just a date column, but instead a date/time column. I am bringing together a directory of files that look like this and have overlapping times but I only want to keep the newer data instead of combining them together:</p>
  <p><strong>List A</strong><br>
  <a href="https://i.stack.imgur.com/QjW5P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QjW5P.png" alt="List A" /></a></p>
  <p><strong>List B</strong><br>
  <a href="https://i.stack.imgur.com/b51YP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b51YP.png" alt="List B" /></a></p>
  <p>Does anyone have a strategy to accomplish this goal or is this something I should do outside of Power Query, such as python?</p>
  <p>Many thanks in advance for any insight you can provide!</p>
  <pre><code>
  let
      Source = Folder.Files(&quot;C:\Users\xxxx\OneDrive\Documents\Atom Projects\10MinOrtho\2. Orthometric\2021-06\10MinOrthos&quot;),
      #&quot;Filtered Hidden Files1&quot; = Table.SelectRows(Source, each [Attributes]?[Hidden]? &lt;&gt; true),
      #&quot;Invoke Custom Function1&quot; = Table.AddColumn(#&quot;Filtered Hidden Files1&quot;, &quot;Transform File (2)&quot;, each #&quot;Transform File (2)&quot;([Content])),
      #&quot;Renamed Columns1&quot; = Table.RenameColumns(#&quot;Invoke Custom Function1&quot;, {&quot;Name&quot;, &quot;Source.Name&quot;}),
      #&quot;Removed Other Columns1&quot; = Table.SelectColumns(#&quot;Renamed Columns1&quot;, {&quot;Source.Name&quot;, &quot;Transform File (2)&quot;}),
      #&quot;Expanded Table Column1&quot; = Table.ExpandTableColumn(#&quot;Removed Other Columns1&quot;, &quot;Transform File (2)&quot;, Table.ColumnNames(#&quot;Transform File (2)&quot;(#&quot;Sample File (2)&quot;))),
      #&quot;Changed Type&quot; = Table.TransformColumnTypes(#&quot;Expanded Table Column1&quot;,{{&quot;Source.Name&quot;, type text}, {&quot;Column1&quot;, type date}, {&quot;Column2&quot;, type time}, {&quot;Column3&quot;, type number}}),
      #&quot;Removed Columns&quot; = Table.RemoveColumns(#&quot;Changed Type&quot;,{&quot;Source.Name&quot;}),
      #&quot;Merged Date and Time&quot; = Table.CombineColumns(#&quot;Removed Columns&quot;, {&quot;Column1&quot;, &quot;Column2&quot;}, (columns) =&gt; List.First(columns) &amp; List.Last(columns), &quot;Merged&quot;),
      #&quot;Sorted Rows&quot; = Table.Sort(#&quot;Merged Date and Time&quot;,{{&quot;Merged&quot;, Order.Ascending}})
  in
      #&quot;Sorted Rows&quot;
  
  </code></pre>