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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Matt22365
Resolver III
Resolver III

Power Query help - If text contains or text contains

Hi

I hope someone can help

I would like to use the add column feature of the query editor to search 2 columns of text and return a phrase if either contains what i am looking for.

I have written the formula but all it returns is errors, can anyone see the error in my formula?

if Text.Contains([Project Number], "ABCD") or Text.Contains ([Status 1],"ABCD") then "ABCD Related" else null)

Thanks for your help

Matt 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Matt22365 

what exactly error do you get? from my point everything look ok, except closed parenthesys ")" in the very end of your statement.

also be sure, your columns have a Text date type


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

@Matt22365 

what exactly error do you get? from my point everything look ok, except closed parenthesys ")" in the very end of your statement.

also be sure, your columns have a Text date type


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38 

Thanks for getting back to me so quick. One of the columns wasnst specified to Text. ive changed it and it works great now.

Thanks

Matt 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.