Forum Discussion
Pass a list as filter argument in Power Query
- 9 years ago
This would be the way:
= Table.SelectRows(factSales, each List.Contains(requiredProductNumbers, [Product]))
Having the same issue here, have been trying to figure this out all morning.
No luck! If someone could elaborate futher it would be appreciated greatly.
For those that have trouble with List.Contains, you might need Table.Contains instead.
Had the same requirement for a project using Power Query for Excel. The table containing the values to be passed to the filter was in a table on an Excel sheet, so end users could update the values as needed. I created a query to reference that table, "tblAgents" with a header value of "AgentID." To help understand the syntax, let's assume the table that I want to filter has a column of "AgentIdentifier."
Here's the code that works for me:
#"Filtered Rows" = Table.SelectRows(Source, each Table.Contains(tblAgents, [AgentID = [AgentIdentifier]]))
- Drew2487 years agoFrequent Visitor
i have tried this method and keep getting zero results, could you send a sample workbook containing this filtering method so i can take a look?