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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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