title: KQL reformat table add columns based on distinct values in column
body: <p>I'm looking for a smart way in Kusto Query Language (KQL) to reformat a table. One Column (in this example Car-column) gives the kind of new rows. So I'm looking for a KQL pipe command to add columns and reduce the number of rows by reordering the content.</p>
  <p>E.g. I would like to format this example table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Distance</th>
  <th>avg. Velocity</th>
  <th>Car</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0</td>
  <td>0</td>
  <td>Audi</td>
  </tr>
  <tr>
  <td>0</td>
  <td>0</td>
  <td>VW</td>
  </tr>
  <tr>
  <td>0</td>
  <td>0</td>
  <td>Porsche</td>
  </tr>
  <tr>
  <td>200</td>
  <td>60</td>
  <td>Audi</td>
  </tr>
  <tr>
  <td>200</td>
  <td>55</td>
  <td>VW</td>
  </tr>
  <tr>
  <td>200</td>
  <td>70</td>
  <td>Porsche</td>
  </tr>
  <tr>
  <td>400</td>
  <td>63</td>
  <td>Audi</td>
  </tr>
  <tr>
  <td>400</td>
  <td>54</td>
  <td>VW</td>
  </tr>
  <tr>
  <td>400</td>
  <td>77</td>
  <td>Porsche</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>to look like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Distance</th>
  <th>Audi</th>
  <th>VW</th>
  <th>Porsche</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  </tr>
  <tr>
  <td>200</td>
  <td>60</td>
  <td>55</td>
  <td>70</td>
  </tr>
  <tr>
  <td>400</td>
  <td>63</td>
  <td>54</td>
  <td>77</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Is there a good (maybe one line) kql-cmd to get to this result?</p>
  <p>Background information: After an Azure Digital Twins Query, joined with a Azure Data Explorer table and some piped commands, I get Table 1, but I want to plot the data as seperate graphes in one grafana diagram. Therefore I need the data as shown in Table 2. Currently I use hard coded car names e.g. '| where Car = &quot;Audi&quot;' and join columns together... That's not efficient nor reusable. There must be a better way!</p>
  <p>I'm looking forward for your answers :)
  Chris</p>