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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
zakkyang
Frequent Visitor

Power BI DAX: String manipulation--> how to search multiple values and return a mapping value

0

For example, I have a column of web site:

www.google_b.com
www.amazon_1-3b.com
www.amazon345.com

I know that google and amazon are the ones I want to retrieve for another column.

I want to have this column as below

www.google-a.com                google
www.google_b.com                google
www.amazon_1-3b.com             amazon
www.amazon345.com               amazon

I will have a list of the desired keywords to map with like [google, amazon, facebook, etc] Does anyone know how to get the dax formula?

It is more like a LIKE "%xyz%" syntax in SQL.

Thanks.

1 ACCEPTED SOLUTION

Thanks J. I found a solution using SWITCH. 

View solution in original post

4 REPLIES 4
tex628
Community Champion
Community Champion

Hi @zakkyang , 

I'm thinking you should be able to use something along the lines of this:

Column = List.First(List.FindText({Keyword list}, [Web site column]))


List.FindText - PowerQuery M | Microsoft Docs
List.First - PowerQuery M | Microsoft Docs

How does the output look? 


Br, 
J


Connect on LinkedIn

Hi J,

 

Cannot find the List.First function, is it power query or dax?

tex628
Community Champion
Community Champion

Power Query! 


Connect on LinkedIn

Thanks J. I found a solution using SWITCH. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors