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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
GoingIncognito
Advocate III
Advocate III

Text.Startswith() with plural strings

Hi.

 

How do I accomplish - using M - excluding all strings that begin with "xyz", "ab", any number, etc.

It would be something like =Table.SelectRows(#"last step", each Text.StartsWith([column], "") = false ) ?

Inserting false would exclude all the values? But how do I replace "" with a list of values? 

Thank you!

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @GoingIncognito ,

 

You could use IF() and or/and to return your expected result.

Here is the similar case for your reference.

https://community.powerbi.com/t5/Desktop/M-Query-Editor-Trouble-with-Conditional-IF-statement/m-p/96...

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @GoingIncognito ,

 

Has your problem been solved? If the problem has been solved, you could accept the reply you like.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
v-eachen-msft
Community Support
Community Support

Hi @GoingIncognito ,

 

You could use IF() and or/and to return your expected result.

Here is the similar case for your reference.

https://community.powerbi.com/t5/Desktop/M-Query-Editor-Trouble-with-Conditional-IF-statement/m-p/96...

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
pceglie
Resolver I
Resolver I

I did actually look at it before postin a question because I thought my case is such an easy scenario that you could just insert a List.Contains or something in my example and make it work? Or am I completely wrong? Thank you for the link and all!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.