Power Query - List Contains

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I know you can use the following formula to filter to a List.

= Table.SelectRows(#"Renamed Columns", each List.Contains(SearchItem_UTable,[PartNumber]) or List.NonNullCount(SearchItem_UTable)=0)

My List is named: SearchItem_UTable

Is there a way to filter if the column "contains" the data within it?

If my "List" value is 1026170-101 and for example one of the rows has a value of:

1026170-101, 1026156-101, 1027772-101, 1028239-101 (please note these part numbers could be subject to change based on LRIP changes)

Is there a way to do this? But I want use my "List" as the filter source

Thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You can supply a comparer function, so:

Power Query:
= Table.SelectRows(#"Renamed Columns", each List.Contains(SearchItem_UTable,[PartNumber],(x as text, y as text)=>Text.Contains(x, y)) or List.NonNullCount(SearchItem_UTable)=0)
 
Upvote 0
Solution
Glad to help, and merry Christmas! :)
 
Upvote 0

Forum statistics

Threads
1,223,981
Messages
6,175,775
Members
452,668
Latest member
mrider123

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