I have a big data table which needs to be filtered by several columns. I am thinking using inner join the filter table with data table to get results. The question is the filters are dynamic.
For example, the user can use two columns to filter (Select data with Acct= 1001 or 1002 or 1003 or 1004 and Tran= 1 or 2 or 3). Table is in below.
col1 col2
Acct Tran
==== ====
1001 1
1002 2
1003 3
1004
Or the user can add one column at the end of the table, using three columns to filter (Select data with Acct= 1001 or 1002 or 1003 or 1004 and Tran= 1 or 2 or 3 and Dept=a or b or c). Table is in below
col1 col2 col3
Acct Tran Dept
==== ==== ====
1001 1 a
1002 2 b
1003 3 c
1004
The number of columns and column names may change. Does someone know how to fulfill this function in Power Query? or VBA?
Many thanks.