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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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