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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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,224,884
Messages
6,181,569
Members
453,053
Latest member
Kiranm13

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