Forum Discussion

fernandoC's avatar
fernandoC
Helper V
4 years ago
Solved

How to transform column to remove duplicates

Hi Team,

 

I wanted to request your help as I want to do the following, I have a table such as this one:

 

NameSkill
BobWriting
BobReading
BobSpeaking

 

What I want to do is to transform the table so that is provides the following result:

NameSkill 1Skill 2Skill 3
BobWritingReadingSpeaking

 

I've been trying to pivot the column but it doesn't give me the correct result. Any ideas?.

 

Thanks!. 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Here you go. You need to reference your skills as a new table, remove dups, add index and merge back to original table. Was going to share the PBIX file but it wont let me.   This gif walks you through all the steps

     

     

    ā€ƒ

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Here you go. You need to reference your skills as a new table, remove dups, add index and merge back to original table. Was going to share the PBIX file but it wont let me.   This gif walks you through all the steps

     

     

    ā€ƒ

    • fernandoC's avatar
      fernandoC
      Helper V

      Thanks Anonymous for the detailed explanation ;). 

  • HotChilli's avatar
    HotChilli
    Community Champion

    Add an Index, then Pivot the Index column (with 'do not aggregate' option)

    • fernandoC's avatar
      fernandoC
      Helper V

      Hi HotChilli 

       

      Thank you for your response. 

       

      I've created the index column and pivoted with the values from 'Skills', however, it's not providing the desired result. Maybe I'm missing a step.

       

      Thank you for your help on this!.