Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Good Afternoon,
Haven't had to use Power Query in a while, but don't understand why I am unable to filter my column [Facility] correctly.
I want to include only those rows where the text "TSI" or "HUB" does not appear anywhere in the value.
Alternatively stated, exclude all rows where either of these two text strings exist.
Below is the last line of the Advanced Editor.
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each not Text.Contains([Facility], "TSI") or not Text.Contains([Facility], "HUB")
in
#"Filtered Rows"
Am I not using this function correctly?
All help is much appreciated!
Thanks and kind regards,
Solved! Go to Solution.
bracked missing after each. Since you are using one and condition, hence brackets are needed.
Use this
= Table.SelectRows(#"Renamed Columns", each (not Text.Contains([Facility],"HUB") and not Text.Contains([Facility],"TSI")))Alternatively, you can use an OR condition with not outside'
= Table.SelectRows(#"Renamed Columns", each not (Text.Contains([Facility],"HUB") or Text.Contains([Facility],"TSI")))
A potentially easier way to exclude values from a row would be to use the M 'does not equal' operator ('<>'). I'd suggest something like this:
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Facility] <> "TSI" and [Facility] <> "HUB"
in
#"Filtered Rows"
bracked missing after each. Since you are using one and condition, hence brackets are needed.
Use this
= Table.SelectRows(#"Renamed Columns", each (not Text.Contains([Facility],"HUB") and not Text.Contains([Facility],"TSI")))Alternatively, you can use an OR condition with not outside'
= Table.SelectRows(#"Renamed Columns", each not (Text.Contains([Facility],"HUB") or Text.Contains([Facility],"TSI")))
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |