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
ryan_b_fiting
Post Patron
Post Patron

Search text field with Wildcard

Hello Community - 

 

I am looking for some help when searching a text field.  I am trying to use an IF formula to search the text field that contains certain strings.  For the most part this works, but my issue is there I need to be able to search for a string "light - N Ounces" where N could be any number of ounces between 1 and 164.  I cannot seach for 'light' only, because that string occurs within other areas in the text field.  But I need the 'light' to be immediately followed by the 'N ounces' text string to categorize it.

 

I am using the CONTAINSTRING function in my current formula as I am looking for other keywords already, but I cannot figure out how to identify a string that has a changing value within it.

 

Any help would be greatly appreciated.

Thank You

Ryan Fiting

1 ACCEPTED SOLUTION
Nathaniel_C
Community Champion
Community Champion

Hi @ryan_b_fiting ,

Contains = IF(CONTAINSSTRING(max(stringSearch[Column1]),"light - *ounces"),"Yes", "NO")


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Community Champion
Community Champion

Hi @ryan_b_fiting ,

Glad this worked for you!

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Nathaniel_C
Community Champion
Community Champion

Hi @ryan_b_fiting ,

Contains = IF(CONTAINSSTRING(max(stringSearch[Column1]),"light - *ounces"),"Yes", "NO")


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_b_fiting , as you can see, using the wildcard "*" works.

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

Nathaniel_C_0-1653936031876.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




tamerj1
Super User
Super User

Hi @ryan_b_fiting 

please provide some examples 

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
Top Kudoed Authors