title: Add column from one table to another
body: <p>I have the following tables:</p>
  
  <p>Table A:</p>
  
  <pre><code> ___________________
  |    ID    | NUMBER |
  |__________|________|
  | 10000378 |    1   |  
  |          |        |
  </code></pre>
  
  <p>Table B:</p>
  
  <pre><code> _________________________________________________
  |     ...    |    ID    |  Column 1  |  Column 2  |
  |____________|__________|____________|____________|
  |     ...    | 10000378 |      7     |      2     |
  |            |          |            |            |
  </code></pre>
  
  <p><code>Table A</code> and <code>Table B</code> share the same <code>ID</code> value. </p>
  
  <p>Not that it matters too much, the <code>ID</code> in <code>Table A</code> is it's key, and can be found in <code>Table B</code>. </p>
  
  <p><code>Table A</code>'s <code>NUMBER</code> column tells me which <code>Table B</code> column to read. </p>
  
  <p>For example:</p>
  
  <pre><code>IF
      [Table A].[NUMBER] = 1
  THEN
      put the value of [Table B].[Column 1] into [Table B].[My Column]
  
    ... and so on
  </code></pre>
  
  <p>As a visual example (<strong>my desired result</strong>):</p>
  
  <pre><code> _______________________________________________________________
  |     ...    |    ID    |  Column 1  |  Column 2  |  My Column  |
  |____________|__________|____________|____________|_____________|
  |     ...    | 10000378 |      7     |      2     |      7      |
  |            |          |            |            |             |
  </code></pre>
  
  <p>With <code>My Column</code> being the result I am after (which comes from <code>Column 1</code> - as specified by <code>Table A</code>'s <code>NUMBER</code> value for the ID of <code>10000378</code>).</p>
  
  <h3>What I have tried so far</h3>
  
  <p>I have set up a <code>1-to-1</code> relationship between <code>Table A</code> and <code>Table B</code> (on the <code>ID</code> column`).</p>
  
  <p>I then went into the <code>Power Query Editor</code> tried adding a <code>Conditional Column</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/PdyBy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PdyBy.png" alt="screenshot"></a></p>
  
  <p>But that doesn't allow me to reference <code>Table A</code> in any way. </p>
  
  <p>So I decided to try the <code>Append Queries as New</code> option:</p>
  
  <p><a href="https://i.stack.imgur.com/QxgTU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QxgTU.png" alt="screenshot"></a></p>
  
  <p>Selecting the <code>Two tables</code> radio button, setting <code>Primary Table</code> to <code>Table B</code> and <code>Table to append to the primary table</code> to <code>Table B</code>.</p>
  
  <p>With the idea of creating the following structure from which I can get my desired result (but adding the <code>NUMBER</code> column, which I don't really want but can live with):</p>
  
  <pre><code> _____________________________________________________________________________
  |     ...    |    ID    |  Column 1  |  Column 2  |   NUMBER    |  My Column  |
  |____________|__________|____________|____________|_____________|_____________|
  |     ...    | 10000378 |      7     |      2     |      1      |      7      |
  |            |          |            |            |             |             |
  </code></pre>
  
  <p>Doing the append copied all of the contents of <code>Table B</code> and inserted the <code>NUMBER</code> column which is fine, but all the values in that <code>NUMBER</code> column are now <code>null</code>. </p>
  
  <p>I don't understand why this is the case.</p>
  
  <p>How can I achieve my desired result?</p>