Forum Discussion

PowerBITestingG's avatar
PowerBITestingG
Resolver I
3 years ago

Revert Unpivot

I have the following data:

 

Name  Attribute   Value

ID900

  First Name  Kevin
ID900  Last Name  Jorbs
ID900  City  New York

 

And I have to transform it to this:

 

Name    First Name    Last Name    City
ID900    Kevin    Jorbs  New York

 

Any ideas?

2 Replies

  • If you want to un-un-pivot it means you want to pivot. 

     

    In the Power Query Editor go to Transform -- > Pivot Column.

     

    Select Advanced Options --> Don't Aggregate

     

     

    = Table.Pivot(Source, List.Distinct(Source[#"  Attribute"]), "  Attribute", "   Value")

    • PowerBITestingG's avatar
      PowerBITestingG
      Resolver I

      Both columns are text but apparently its trying to convert something to  number

       

      "DataFormat.Error: We couldn't convert to Number."

      Any ideas?