Forum Discussion

Rnaval's avatar
Rnaval
Icon for Post Partisan rankPost Partisan
6 months ago
Solved

Need help with new column based on a search string

I have a field with multiple values. Is there a way for me to search for a specific string and capture the value listed after the string and put it in a new column?

 

Here's an example...I want to capture the value after Scanner name, in this case "B&T ITS VN-QM-HC Weekly" and create a new column with just this value.

 

  • hi Rnaval 

     

    > Load your data into Power BI.

    >Go to Transform Data → this opens Power Query

    >Select the column that contains your text field.

    1. Use Add Column → Extract → Text After Delimiter.
      • Set the delimiter as "Scan Name"
      • This will create a new column with everything that comes after "Scan Name"
    2. If you only want the first word/phrase (like"B&T ITS VN-QM-HC Weekly") , you can further split by another delimiter (for example, newline, comma, or semicolon depending on how your field is structured).

     

    Regards.

    Ritesh

     

2 Replies

  • hi Rnaval 

     

    > Load your data into Power BI.

    >Go to Transform Data → this opens Power Query

    >Select the column that contains your text field.

    1. Use Add Column → Extract → Text After Delimiter.
      • Set the delimiter as "Scan Name"
      • This will create a new column with everything that comes after "Scan Name"
    2. If you only want the first word/phrase (like"B&T ITS VN-QM-HC Weekly") , you can further split by another delimiter (for example, newline, comma, or semicolon depending on how your field is structured).

     

    Regards.

    Ritesh

     

    • Rnaval's avatar
      Rnaval
      Icon for Post Partisan rankPost Partisan

      Thank you, that was quite easy to do.