Forum Discussion

Awollet33's avatar
Awollet33
Icon for Helper I rankHelper I
5 years ago

PowerBI Data cleaning question - Turning 2 columns into multiple columns

Hi PowerBI Community,

 

I am a new member and I recently started on a project. I am stuck trying to figure out how to clean my data and was looking to see if anyone else has ran into this problem. Any information is greatly appreciated! 

 

 

Thank you,

Adam

6 Replies

  • Awollet33 , is there any column that can differentiate between the first a,b,c,d, and the second set?

     

    Some Power query coding might help. ImkeF , can you help with this?

    • Awollet33's avatar
      Awollet33
      Icon for Helper I rankHelper I

      Hi amitchandak 

       

      I am not sure I understand your question. I have only have 2 columns in the dataset.

       

      Thanks,

      Adam

  • Hi, Awollet33 

    Please correct me if I misunderstood your question.

    Are you trying to transform the table from look-like-left to look-like-right? Or, from look-like-right to look-like-left?

    In my opinion, it is better to have a look-like-left table as source data.

     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi, 

        Thank you for your feedback.

        Once you get the data into power query editor, you can select the Account-column, and pivot it.

        Then you can have the table that looks like the right side of your picture.

         

        Hi, My name is Jihwan Kim.

        If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

    • Awollet33's avatar
      Awollet33
      Icon for Helper I rankHelper I

      Hi Jihwan_Kim 

      I have a problem with the pivot. I am working with 750,000 accounts and 375,000 of them are distinct. 

      I would like it so the account numbers are discint so 375,000 distinct rows with a column for each coresponding code. The pivot is not giving me that result. Thank you for your time. If you have any other ideas they would be greatly appreciated.

       

      Thanks,

      Adam