Forum Discussion
JuanSombrero
9 years agoFrequent Visitor
Pass a list as filter argument in Power Query
Hi all, I have a fact table with transactions (sales and product numbers), and a second list of 'required product numbers'. This list is dynamic and can change every time I use the report. I want...
- 9 years ago
This would be the way:
= Table.SelectRows(factSales, each List.Contains(requiredProductNumbers, [Product]))
Rygaard
5 years agoResolver I
This dont work - Because people have imported their table as a table and not as a list.
if you "table" do not have a "list" icon.. it wont work.
so the "list" of parameterse is a table when you import it - but you can easy chang this
- click the table you want to use a list
- click Transform tab (next to home)
- select convert to list
NOW you can use it as a list
= Table.SelectRows(#"Omdøbte kolonner", each List.Contains(Tabel4,[Vejesag]))
DamianM
1 year agoFrequent Visitor
Rather than adding an additional step to transform the table to a list, simple add the column name of the table to the end of the step
From:
= Excel.CurrentWorkbook(){[Name="yourTable"]}[Content]
To:
= Excel.CurrentWorkbook(){[Name="yourTable"]}[Content][yourListColumn]