Power Query delete rows containing X?

vbaNumpty

Board Regular
Joined
Apr 20, 2021
Messages
171
Office Version
  1. 365
Platform
  1. Windows
Can someone provide me with the line to use in a Power Query to delete all rows that contain a specific value in column 1?

I was trying to repurpose the remove blank columns code with list.contains in place of list.isempty but I am not very familiar with the M language.

VBA Code:
List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))

I am thinking I need something along the lines of the following

VBA Code:
List.Contains(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))      ' No idea where I put the value I am looking to eliminate
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
If you use the Power Query user interface it would look more like this:-
Where [Exclusion Test] is the column / field name used to apply the condition.

Power Query:
= Table.SelectRows(#"Changed Type", each ([Exclusion Test] <> null and [Exclusion Test] <> "x"))
 
Upvote 0
Solution
If you use the Power Query user interface it would look more like this:-
Where [Exclusion Test] is the column / field name used to apply the condition.

Power Query:
= Table.SelectRows(#"Changed Type", each ([Exclusion Test] <> null and [Exclusion Test] <> "x"))
Awesome thanks a lot!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top