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
Rocky_Brown
Helper I
Helper I

undefinedError whane using Search function in DAX

I am trying to search a field with multiple text scenarios but get an error.

 

I coulduse the help to see if this can be done

 

Search("*Text1*" || "*Text2*",'tableName[FieldName, 1, 0)= 1, "Notes"
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Rocky_Brown ,

 

For your requirement, you could 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:

powerbi - How to search multiple strings in a string? - Stack Overflow

 

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @Rocky_Brown ,

 

For your requirement, you could 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:

powerbi - How to search multiple strings in a string? - Stack Overflow

 

 

 

Best Regards,

Stephen Tao

 

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

tamerj1
Super User
Super User

@Rocky_Brown 
Would you please explain with one example what are you trying to achieve? 

AnkitKukreja
Super User
Super User

Hi! @Rocky_Brown 

 

Please see if this helps. It's already answered in other posts.

https://community.powerbi.com/t5/Desktop/Search-for-multiple-text-in-one-column-with-OR/m-p/469698

https://community.powerbi.com/t5/Desktop/Search-multiple-texts-in-a-string/m-p/186105

 

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

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.