title: Combining tables with different number of columns, some in common with same header names
body: <p>Hello. So I am working out of the query editor of a PowerPivot. I have two tables in the PowerPivot window, which I am editing with the query editor in the table properties tab. The tables have a different number of columns, some columns they have in common with each other, each contain unique columns. The columns they do share have identical header names. I would like to stack one table on top of the other while adding new columns to the original table.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>For example:&lt;p&gt;&lt;/p&gt;
  &lt;table&gt;&lt;i&gt;TableA&lt;/i&gt;
    &lt;th&gt;Col1&lt;/th&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;th&gt;Col3&lt;/th&gt;
    &lt;tr&gt;&lt;td&gt;A&lt;/td&gt;&lt;td&gt;B&lt;/td&gt;&lt;td&gt;C&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;table&gt;&lt;i&gt;TableB&lt;/i&gt;
  &lt;th&gt;Col1&lt;/th&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;th&gt;Col4&lt;/th&gt;
    &lt;tr&gt;&lt;td&gt;D&lt;/td&gt;&lt;td&gt;E&lt;/td&gt;&lt;td&gt;F&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;p&gt;&lt;/p&gt;
  &lt;table&gt;&lt;i&gt;Combined&lt;/i&gt;
    &lt;th&gt;Col1&lt;/th&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;th&gt;Col3&lt;/th&gt;&lt;th&gt;Col4&lt;/th&gt;
    &lt;tr&gt;&lt;td&gt;A&lt;/td&gt;&lt;td&gt;B&lt;/td&gt;&lt;td&gt;C&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;
      &lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;D&lt;/td&gt;&lt;td&gt;E&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;F&lt;/td&gt;
      &lt;/tr&gt;
    &lt;tr&gt;
      
    &lt;/table&gt;
  &lt;p&gt;&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  <h1>Example Code:</h1>
  <pre><code>SELECT tableA.col1, tableA.col2, tableA.col3, NULL AS col4
  FROM [tableA$]
  UNION
  SELECT tableB.col1, tableB.col2, NULL AS col3, tableB.col4
  FROM [tableB$];
  </code></pre>
  <p>I saw a post that used the NULL AS in order to compensate for the missing column(s) but once I add it in I get the &quot;no columns detected&quot; error message. In reality I'm working with dozens of sheets with columns ranging from 15 to over70, and rows ranging from 300. to 350k which is why I'm to using PowerPivot. <p></p>I imported my sheets to PowerPivot by creating a connection to worksheet.<p></p> P.S. I'm new to both PowerPivot and Query Editor. Thank you for any help in advance.</p>