Forum Discussion

ABech's avatar
ABech
Frequent Visitor
4 years ago
Solved

Split string after every n'th character multiple times

Hello experts   After many hours i finally succeded with some Power Automate flows which exports my firms Planner tasks, so i can use that export as a source for Power BI.   I just have 1 problem...
  • Greg_Deckler's avatar
    4 years ago

    ABech Try this:

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkkszlYwVNJRCsnMDcnP9cpPVYrVgQobAYVdczIRAsYgdfm5YLFYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}}),
        #"Split Column by Position" = Table.SplitColumn(#"Changed Type", "Column2", Splitter.SplitTextByRepeatedLengths(3), {"Column2.1", "Column2.2", "Column2.3"}),
        #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Position",{{"Column2.1", type text}, {"Column2.2", type text}, {"Column2.3", type text}}),
        #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"Column1"}, "Attribute", "Value"),
        #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
    in
        #"Removed Columns"