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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mpaukee
Regular Visitor

Search multiple texts in a string

I am looking to replicate the following excel formula in Power BI.

 

if(or(SUMPRODUCT(--ISNUMBER(SEARCH({"Flood","Freez","Adverse Weather","Severe Weather","Earthmovement","Earth movement","Hailstorm","Windstorm","Wind storm","Winterstorm","Winter storm","Storm","Tornado","Cyclone","Derecho","Natural Peril","East Coast low in Australia","Earthquake","Typhoon","Hail Storm","Heavy Rain","Mudslide","Thunder","Polar Vortex","Torrential Rain","Tsunami","Wind damage","Hurricane"},[@[Global Loss Event Name]])))>0

 

this doesn't work in DAX unfortunately.

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@mpaukee

 

For your requirement, you can try Power Query approach, you can populate the search text into list and create custom function to iterator each one of them to check if within the text. Please refer to thread below:

 

https://stackoverflow.com/questions/35316657/how-to-search-multiple-strings-in-a-string/35324537

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@mpaukee

 

For your requirement, you can try Power Query approach, you can populate the search text into list and create custom function to iterator each one of them to check if within the text. Please refer to thread below:

 

https://stackoverflow.com/questions/35316657/how-to-search-multiple-strings-in-a-string/35324537

 

Regards,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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