Forum Discussion

Mic1979's avatar
Mic1979
Post Partisan
1 year ago
Solved

Unpivot Columns using the list

Dear all, here my question. I have this sample table: I need to create a custom function to split the columns by the /, and then unpivot them to get this: As the original table is made...
  • slorin's avatar
    1 year ago

    Hi Mic1979 

     

    let
    Source = Your_Source,
    Text_Split = Table.TransformColumns(Source,
    {{"Stuffing_Box_Material", each Text.Split(_, " / "), type text},
    {"Body_Material", each Text.Split(_, " / "), type text}
    }),
    Expand1 = Table.ExpandListColumn(Text_Split, "Body_Material"),
    Expand2 = Table.ExpandListColumn(Expand1, "Stuffing_Box_Material")
    in
    Expand2

    Stéphane