Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.