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
IanWaring
Helper IV
Helper IV

Table.SelectRows with either of 2 starting strings?

I have a query picking rows out of a table using:
Table.SelectRows(#"DataTableSource", each (Text.StartsWith([ItemId],"QSR")))

 

but want to select rows starting either "QSR" or "NVI":

Table.SelectRows(#"DataTableSource", each (Text.StartsWith([ItemId],"QSR") OR TextStartsWith[ItemId],"NVI")))

but appear to be unable to slip in any OR relationship without getting "Expression.SyntaxError: Token Comma expected".

Any ideas how I fix this? (been trying for an hour unsuccessfully).

 

1 ACCEPTED SOLUTION
AntonioM
Solution Sage
Solution Sage

= Table.SelectRows(#"DataTableSource", each (Text.StartsWith([Column1], "QSR") or Text.StartsWith([Column1], "NVI")))

 

I think some of the brackets may be the issue, please give this a try. 

View solution in original post

2 REPLIES 2
IanWaring
Helper IV
Helper IV

Superstar. Thank you 🙂

AntonioM
Solution Sage
Solution Sage

= Table.SelectRows(#"DataTableSource", each (Text.StartsWith([Column1], "QSR") or Text.StartsWith([Column1], "NVI")))

 

I think some of the brackets may be the issue, please give this a try. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.