I need to filter a table. The challenge for me is that the filter information (column names, number of columns, as well as filter values) can change.
After doing some research I think List.Generate() could help me here. The idea is to create a loop that in each loop pass applies one filter condition that is dynamically passed to the loop.
Unfortunately I don't understand List.Generate() well enough to build this myself. Hence any help would be greatly appreciated!
Here is my setup:
I have one table with data (DATASTART)
and one table (FILTER) with information which columns of DATASTART should be filtered and the corresponding filter values.
With static Power Query code
= Table.SelectRows(DATASTART, each ([A] = 1) and ([B] = 2))
the result would be this table (DATARESULT).