Forum Discussion

P-Lag's avatar
P-Lag
Helper I
3 years ago
Solved

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]...
  • johnt75's avatar
    3 years ago

    You could try Text.Replace and use "" as the new text.

  • v-jingzhang's avatar
    v-jingzhang
    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.

  • wdx223_Daniel's avatar
    wdx223_Daniel
    3 years ago

    try this

    Text.Combine(Splitter.SplitTextByAnyDelimiters({"-1","S"})([EmployeeID]))