Forum Discussion
Anonymous
3 years agoNot applicable
Text.PositionOfAny
I'm using the text function "Text.PositionOfAny([Assistência], {"S"}, Occurrence.All)" to get the sequence of S from a string field. This is the string field "NNNNNNNNNSNNSNNNNNNNNNNNNNNNNNNNNNN...
- 3 years ago
Hi,
This M code works
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Added Custom" = Table.AddColumn(Source, "Custom", each List.Transform(Text.PositionOf([Text], "S", Occurrence.All), each Number.From(_) + 1)), #"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From), "-"), type text}) in #"Extracted Values"Hope this helps.
Ahmedx
3 years agoSuper User
pls try this
Text.Combine(
List.Transform(
Text.PositionOfAny("W"&[Assistência], {"S"}, Occurrence.All), Text.From),
"-")