Forum Discussion
hamahilal
Jan 31, 2023Copper Contributor
selecting specific characters (3capital letters and 4numbers from a row field in a column
Dear, I have an renumbers only from a request how to split a specific combination of 3capital letters and 4numbers from a columns below written in red color: 2G/HUAWEI/Region5/Samawa/BSAMH01/Wark...
PeterBartholomew1
Jan 31, 2023Silver Contributor
Power Query
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Data", type text}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "Data", Splitter.SplitTextByEachDelimiter({"_"}, QuoteStyle.Csv, true), {"Data.1", "Data.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Data.1", type text}, {"Data.2", type text}}),
#"Split Column by Delimiter1" = Table.SplitColumn(#"Changed Type1", "Data.2", Splitter.SplitTextByEachDelimiter({"-"}, QuoteStyle.Csv, false), {"RedString", "Data.2.2"}),
#"Removed Other Columns" = Table.SelectColumns(#"Split Column by Delimiter1",{"RedString"})
in
#"Removed Other Columns"