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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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