Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Replace string values with wildcard

I have the below list of points within a column and i am trying to have them all just say MaTmp and remove anything after that. 

Is there a ways to do this like you do in excel with find *MaTmp*  and replace all that you find with MaTmp?

MaTmp01
MaTmp02
MaTmp1
MaTmp-1
MaTmp2
MaTmp-2
MaTmp3
MaTmp-3
MaTmp4
MaTmp-4
MaTmp5
MaTmp6
MaTmpCalc

 

The top was just an example of the abot 112 distanct points that i have and most look like what i showed above but there is a list of 21 below that i am needing to change the 112 to.  There are some with text/value in front or text/value after.

 

MaTmp
OaTmp
SaTmp
MaDmp
RaDmp
OaDmp
EaDmp
ChwVlv
PrHtVlv
RaTmp
RaRh
OaRh
SaCFM
RaCFM
OaCFM
EaCFM
SaTmpSpt
StStPSpt
StStP
DaTmp
ReHtVlv
  • You can useExtract in power query editor.

    Example:

     

     

2 Replies

  • Syk's avatar
    Syk
    Resident Rockstar

    You can useExtract in power query editor.

    Example:

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

    Here are the steps you can follow:

    1. Create calculated column.

    Column 2 =
    IF(
    CONTAINSSTRING(
        'Table'[Column],"MaTmp") = TRUE() ,"MaTmp",BLANK())

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly