Forum Discussion
ABech
4 years agoFrequent Visitor
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...
- 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"
ABech
4 years agoFrequent Visitor
Hello Greg_Deckler
And thank you for your help once more.
I'm quite a newbie at Power BI, and do not have much experience with DAX or transforming data.
Can you tell me where I should insert this code?
Greg_Deckler
Community Champion
4 years agoABech Use the Transform data button on the Home tab to get to Power Query Editor. Create a new Blank query. Open Advanced Editor, replace the entire contents with the code provided.