Home Forums Power BI Query

This topic contains 2 replies, has 1 voice, and was last updated by  jmkas 6 days, 12 hours ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8412

    jmkas
    Participant
    • Started: 1
    • Replies: 2
    • Total: 3

    Hi,

     

    maybe you can help me.. Is there any way to transform table like that:

    I have table

    <table width=”100%”>;
    <tbody>
    <tr>;
    <th>C1</th>
    <th>C2</th>
    <th>C3</th>
    </tr>
    <tr>
    <td>ab1</td>
    <td>ab2</td>
    <td>ab3</td>
    </tr>
    <tr>
    <td>cd1</td>
    <td>cd2</td>
    <td>cd3</td>
    </tr>
    <tr>
    <td>ab1</td>
    <td>rr2</td>
    <td>ff3</td>
    </tr>
    <tr>
    <td>cd1</td>
    <td>ww2</td>
    <td>rr3</td>
    </tr>
    <tr>
    <td>mm1</td>
    <td>rs2</td>
    <td>fd3</td>
    </tr>
    <tr>
    <td>pp1</td>
    <td>aa2</td>
    <td>vv3</td>
    </tr>
    <tr>
    <td>ab1</td>
    <td>tt2</td>
    <td>ds3</td>
    </tr>
    </tbody>
    </table>
    And using C1 column I wanna to convert table like that:

    <table width=”100%”>
    <tbody>
    <tr>
    <th>C1</th>
    <th>C2</th>
    <th>C3</th>
    <th>C22</th>
    <th>C32</th>
    <th>C23</th>
    <th>C33</th>
    </tr>
    <tr>
    <td>ab1</td>
    <td>ab2</td>
    <td>ab3</td>
    <td>rr2</td>
    <td>ff3</td>
    <td>tt2</td>
    <td>ds3</td>
    </tr>
    <tr>
    <td>cd1</td>
    <td>cd2</td>
    <td>cd3</td>
    <td>ww2</td>
    <td>rr3</td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>mm1</td>
    <td>rs2</td>
    <td>fd3</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>pp1</td>
    <td>aa2</td>
    <td>vv3</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    </tbody>
    </table>

    so query have to check if in column C1 are same elements if yes it grabs that row and adds it to the first one at the end like a columns. Sorry for my bad english 😀

    #8413

    jmkas
    Participant
    • Started: 1
    • Replies: 2
    • Total: 3

    ohh, okay, sorry for that this site formated my table into that code.. So there are screenshots from that tables:

    so first table was:

     

    Attachments:
    You must be logged in to view attached files.
    #8415

    jmkas
    Participant
    • Started: 1
    • Replies: 2
    • Total: 3

    And second:

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.