cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

DAX Replace with wildcards

CustomerPrice
Costco USA754
Walmart MX365
Kenny's USA956
Freddy's457

 

From the table above I need to replace the whole cell value for only those that contain the word "USA" to "Offboarded" so I can end up with a table like this

 

CustomerPrice
Offboarded754
Walmart MX365
Offboarded956
Freddy's457

 

I have looked into DAX's "Replace" and "substitute" but cannot make it work for this particular scenario where I believe the usage of *wildcards* may be required.

 

Any suggestions are truly appreciated.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new column like

if(search("USA",[Customer],,0) >0, "Offboarded",[Customer])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try a new column like

if(search("USA",[Customer],,0) >0, "Offboarded",[Customer])

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors