Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
Solved! Go to Solution.
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
Proud to be a Super User!
Hi @ryan_b_fiting ,
Glad this worked for you!
Nathaniel
Proud to be a Super User!
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
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
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!