title: How can I transpose only some columns of a table in power query?
body: <p>I have a table like this in power query:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Date</th>
  <th>Name</th>
  <th>OutputType</th>
  <th>Group1</th>
  <th>Group2</th>
  <th>Group3</th>
  <th>...</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>01/10/2021</td>
  <td>A</td>
  <td>Type1</td>
  <td>565</td>
  <td>63521</td>
  <td>651</td>
  <td>...</td>
  </tr>
  <tr>
  <td>01/10/2021</td>
  <td>A</td>
  <td>Type2</td>
  <td>6546</td>
  <td>6541</td>
  <td>13286</td>
  <td>...</td>
  </tr>
  <tr>
  <td>01/10/2021</td>
  <td>B</td>
  <td>Type1</td>
  <td>0</td>
  <td>5</td>
  <td>685</td>
  <td>...</td>
  </tr>
  <tr>
  <td>01/10/2021</td>
  <td>B</td>
  <td>Type2</td>
  <td>564</td>
  <td>0</td>
  <td>65</td>
  <td>...</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What I'm trying to do is &quot;transpose&quot; only the OutputType and Group headers, so that all my groups are in one column, and my OutputTypes become headers. Something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Date</th>
  <th>Name</th>
  <th>GroupTypes</th>
  <th>Type1</th>
  <th>Type2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>01/10/2021</td>
  <td>A</td>
  <td>Group1</td>
  <td>541</td>
  <td>984</td>
  </tr>
  <tr>
  <td>01/10/2021</td>
  <td>A</td>
  <td>Group2</td>
  <td>8971</td>
  <td>6526</td>
  </tr>
  <tr>
  <td>01/10/2021</td>
  <td>B</td>
  <td>Group3</td>
  <td>321</td>
  <td>98</td>
  </tr>
  <tr>
  <td>01/10/2021</td>
  <td>B</td>
  <td>Group4</td>
  <td>564</td>
  <td>845</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried unpivoting the columns, but I get only a partial result, as all my group types do become a single column. But I can't get to &quot;transform&quot; my OutputType values into headers.</p>
  <p>Does somebody know how to achieve this in power query?</p>
  <p>Sorry if my question is not that clear, my english is not the best.</p>
  <p>Thanks for the help!</p>