Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Remove text in Power M starting from @

Hello,

My column currently in email ([email protected]) form and i only want the ID of the and remove everything starting from @ and only test.email.me will remain. I've tried using Text.Remove (= Text.Remove([UserName], {"@gmail.com"}) but it returns me an expression error Expression.Error: The value isn't a single-character string. Appreciate your replies. Thanks!

  • Hi,

     

    Please try

     

    Best regards

    Michael

    -----------------------------------------------------

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!

    @ me in replies or I'll lose your thread.

     

     

     

     

3 Replies

  • Mikelytics's avatar
    Mikelytics
    Resident Rockstar

    Hi,

     

    Please try

     

    Best regards

    Michael

    -----------------------------------------------------

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!

    @ me in replies or I'll lose your thread.

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      This works! Thanks a lot!

  • Hi Anonymous ,

     

    You can easily do this in Power Query editor in Power BI.

    Consider the following data:

     

    Now I just want to keep the string part before "@" sign in the email address value

    Select your column and follow the steps as shown in the order below:

    A new window appears. Enter the delimiter as "@" and hit OK:

     

    You get the required output: