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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
KristofferAJ
Helper III
Helper III

Find specific word within a text cell

Hi all,

I have a column with cells containing a lot of text.

I would like to create a column which looks for a certain word and return a specific value.

 

1. 

For instance if I was to look for Apple -> return 'Yes' or 'No'

 

Can I make the code look for *app*' or does it need to be fully matching?

 

I would like to have to return entries like 'apple-like' for instance, or or 'apples'

 

I hope this makes sense, right now I'm using the 'add a conditional column' in the query, which is fine, but not taking all possibities into account.

 

Thanks

Kristoffer

 

1 ACCEPTED SOLUTION
goncalogeraldes
Super User
Super User

Hello there @KristofferAJ ! You can use the following:

 

Find word =
IF ( CONTAINSSTRING ( 'Your_Table'[Your_column], "*app*" ), "Yes", "No" )

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

View solution in original post

3 REPLIES 3
KristofferAJ
Helper III
Helper III

Hi, this is great and does the job! - let's say that I want it to look for multiple words, like orange also? can that be built in?

Find word =
IF ( CONTAINSSTRING ( 'Your_Table'[Your_column], "*app*" ), "Yes", "No" )
OR
( CONTAINSSTRING ( 'Your_Table'[Your_column], "*oran*" ), "Yes", "No"

 

Hello there @KristofferAJ ! You can simply do:

Find word =
IF (
    OR (
        CONTAINSSTRING ( 'Your_Table'[Your_column], "*app*" ),
        CONTAINSSTRING ( 'Your_Table'[Your_column], "*oran*" )
    ),
    "Yes",
    "No"
)

For additional help, please @ me in your reply!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

goncalogeraldes
Super User
Super User

Hello there @KristofferAJ ! You can use the following:

 

Find word =
IF ( CONTAINSSTRING ( 'Your_Table'[Your_column], "*app*" ), "Yes", "No" )

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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