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
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
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.