Forum Discussion
koorosh
2 years agoPost Partisan
count back slash
Hi Everybody, I have a table with a column "folder path". It has values like the following:(examples) C:\koorosh\apple\documents C:\mac\user C:\iphone\data\package\app I want to find the numbe...
- 2 years ago
Easy enough,
Greg_Deckler
2 years agoCommunity Champion
koorosh You should be able to easily collapse this down to a single column:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PcxBDoAgDAXRu7D2BG49Br+LBhsxCG0o3N+oidvJy8QYthUoql09A2x2CbBrmlXa8EDLJyonYLr0v5yWtT2WBwPGqfAh7yEQ3Q==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "Column1", "Column1 - Copy"),
#"Replaced Value" = Table.ReplaceValue(#"Duplicated Column","\","",Replacer.ReplaceText,{"Column1 - Copy"}),
#"Added Custom" = Table.AddColumn(#"Replaced Value", "Custom", each Text.Length([Column1]) - Text.Length([#"Column1 - Copy"]))
in
#"Added Custom"