Forum Discussion
P-Lag
3 years agoHelper I
Text.Remove with several characters
Hi! Is it possible in some way to use Text.Remove with several characters? This formula works when I add a new column, using one character in the text.remove: if Text.Contains([Equipment ID]...
- 3 years ago
You could try Text.Replace and use "" as the new text.
- 3 years ago
Hi P-Lag
You can nest multiple Text.Replace functions in one custom step. Text.Replace - PowerQuery M | Microsoft Learn
= Table.TransformColumns(#"previous step name", {{"Equipment ID", each Text.Replace(Text.Replace(_, "-1", ""), "S", "")}})
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. - 3 years ago
try this
Text.Combine(Splitter.SplitTextByAnyDelimiters({"-1","S"})([EmployeeID]))
P-Lag
3 years agoHelper I
Hi
Vijay_A_Verma
Thanks for the tip to remove text.contains. Unfortunately this formula did not work, it removed all 1 and -1, so it removed more values than wanted.
wdx223_Daniel
3 years agoCommunity Champion
try this
Text.Combine(Splitter.SplitTextByAnyDelimiters({"-1","S"})([EmployeeID]))