title: PowerQuery Table.Join duplicate column names
body: <p>I ran into a problem with Power Query (M Language) <strong>Table.Join()</strong> function. Just to demonstrate the issue, I am altering the example taken from the <a href="https://docs.microsoft.com/en-us/powerquery-m/table-join" rel="nofollow noreferrer">Table.Join</a> Documentation Page.</p>
  <p>See the <strong>JoinKind.LeftOuter</strong> hint at the end</p>
  <pre><code>= Table.Join(
      Table.FromRecords({
          [CustomerID = 1, Name = &quot;Bob&quot;, Phone = &quot;123-4567&quot;],
          [CustomerID = 2, Name = &quot;Jim&quot;, Phone = &quot;987-6543&quot;],
          [CustomerID = 3, Name = &quot;Paul&quot;, Phone = &quot;543-7890&quot;],
          [CustomerID = 4, Name = &quot;Ringo&quot;, Phone = &quot;232-1550&quot;]
      }),
      &quot;CustomerID&quot;,
      Table.FromRecords({
          [OrderID = 1, CustomerID = 1, Item = &quot;Fishing rod&quot;, Price = 100.0],
          [OrderID = 2, CustomerID = 1, Item = &quot;1 lb. worms&quot;, Price = 5.0],
          [OrderID = 3, CustomerID = 2, Item = &quot;Fishing net&quot;, Price = 25.0],
          [OrderID = 4, CustomerID = 3, Item = &quot;Fish tazer&quot;, Price = 200.0],
          [OrderID = 5, CustomerID = 3, Item = &quot;Bandaids&quot;, Price = 2.0],
          [OrderID = 6, CustomerID = 1, Item = &quot;Tackle box&quot;, Price = 20.0],
          [OrderID = 7, CustomerID = 5, Item = &quot;Bait&quot;, Price = 3.25]
      }),
      &quot;CustomerID&quot;, JoinKind.LeftOuter
  
  )
  </code></pre>
  <p>Without this hint the the function is running well. With the hint it is failing because of the duplicate column name.</p>
  <pre><code>Expression.Error: A join operation cannot result in a table with duplicate column names (&quot;CustomerID&quot;).
  Details:
      [Type]
  </code></pre>
  <p>From my perspective this is a bug, the key cannot be a duplicate.</p>
  <p>I run into this issue, because the two tables I am trying to join share the same column names besides the join key. Is there a trick how to alias them similarly to a SQL?</p>