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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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