Results 1 to 1 of 1

Thread: Testies

  1. #1
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    238
    Rep Power
    7

    Cool Testies

    Is this Sandy's testies... ?




    Split multiple columns at the same time

    Email 0 1 2 3 4 Email 0 1 2 3 4 5 6 7 8 9
    xxx@abc.com sth1|something sth2|something xxx@abc.com sth1 something sth2 something
    zzz@abc.com sth1|something sth2|something sth3|something zzz@abc.com sth1 something sth2 something sth3 something

    Code:
    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        UOC = Table.UnpivotOtherColumns(Source, {"Email"}, "Attribute", "Value"),
        SortAsc = Table.Sort(UOC,{{"Attribute", Order.Ascending}}),
        Split2Rows = Table.ExpandListColumn(Table.TransformColumns(SortAsc, {{"Value", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Value"),
        Index0 = Table.AddIndexColumn(Split2Rows, "Index", 0, 1),
        RC = Table.RemoveColumns(Index0,{"Attribute"}),
        Pivot = Table.Pivot(Table.TransformColumnTypes(RC, {{"Index", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(RC, {{"Index", type text}}, "en-GB")[Index]), "Index", "Value")
    in
        Pivot
    Last edited by TestAccount; 06-08-2020 at 02:52 PM. Reason: I done dided it, Because I could , :)
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

Similar Threads

  1. Testies
    By sandy666 in forum Test Area
    Replies: 0
    Last Post: 05-27-2020, 06:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •