Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Beginner question : Table (Transpose and Pivot?)

Hello! I have a small problem. I have those data: My goal would be to put them in order: Like in yellow you can see my headers which are in the middle of the data and in different way (Sometim...
  • Anonymous's avatar
    Anonymous
    4 years ago

    I would first Split by Delimiter using the "/", and then split the table into a bunch of two row tables using Table.Split, with 2 as the parameter. This gives you a list of two row tables.

     

    Then I would Promote headers on the nested Tables, then reorder the columns in the nested tables.

     

    The promote headers and reorder steps are:

     

    Split1 = List.Transform(PriorStepName, each Table.PromoteHeaders(_))

    Reorder = List.Transform(Split1, each Table.ReorderColumns(_, {"ID, "Category", "Product", "Daily Goal"}))

     

    Now you can expand the list into a single table. 

    --Nate