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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
theapengelly
Frequent Visitor

Select.Rows function with multiple Text.Contains functions

Hi,

 

I am trying to write a Select.Rows function in PowerBI Desktop using the Text.Contains function, as I want it to filter out everything except values in the column that contain certain text strings. I am trying to use the OR statement but it is not recgonising it.

 

This is what I believe should work but is it not, please help!!

 

= Table.SelectRows(#"Grouped Rows", OR(each Text.Contains([name], "Salesperson"), each Text.Contains([name], "Price"), each Text.Contains([name], "Item"), each Text.Contains([name], "Date"), each Text.Contains([name],  "Status")))

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@theapengelly , Try like

= Table.SelectRows(#"Grouped Rows", (each Text.Contains([name], "Salesperson"), each Text.Contains([name], "Price") or Text.Contains([name], "Item") or Text.Contains([name], "Date") or Text.Contains([name], "Status")))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@theapengelly , Try like

= Table.SelectRows(#"Grouped Rows", (each Text.Contains([name], "Salesperson"), each Text.Contains([name], "Price") or Text.Contains([name], "Item") or Text.Contains([name], "Date") or Text.Contains([name], "Status")))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you, this worked!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.