Hi Everyone,
I have been searching for a while on this topic. Is it possible to allow the end user to enter multiple values into an excel table, send it to power query and filter the source data (Main Query) by the entire list? I was only able to do this with a single value but not multiple values at once.
Here is what I am trying to set up. I have a report that uses multiple queries to show customer sales and various information. There is a unique ID for each customer location. Depending on the request, the end user will need to pull all locations, some locations, or only one location. Example, if the user enters ID #’s 4,6, and 12, I would like power query to filter the ID field for all three ID #s.
I made a list query called “VList” out of the users entry (excel table), then called that query in the “Main Query” where the ID is filtered. However, it returns an empty table. If I change VList to point to a single cell in the excel table, it works fine.
The M code that was used:
In theory I need the following M Code to be dynamic and not hard coded.
How do we tell Power Query to take every record in the list and check if each row in my main query is equal to a value in the list? Please let me know if anyone has any suggestions or attempted to this in the past? Thank you all for your help.
I have been searching for a while on this topic. Is it possible to allow the end user to enter multiple values into an excel table, send it to power query and filter the source data (Main Query) by the entire list? I was only able to do this with a single value but not multiple values at once.
Here is what I am trying to set up. I have a report that uses multiple queries to show customer sales and various information. There is a unique ID for each customer location. Depending on the request, the end user will need to pull all locations, some locations, or only one location. Example, if the user enters ID #’s 4,6, and 12, I would like power query to filter the ID field for all three ID #s.
I made a list query called “VList” out of the users entry (excel table), then called that query in the “Main Query” where the ID is filtered. However, it returns an empty table. If I change VList to point to a single cell in the excel table, it works fine.
The M code that was used:
VList – takes the excel table and drills down to a list
Table.SelectRows(#"Removed Other Columns", each ([#"Vend#"] = VList))
In theory I need the following M Code to be dynamic and not hard coded.
Table.SelectRows(#"Removed Other Columns", each ([#"Vend#"] = 4 or [#"Vend#"] = 6 or [#"Vend#"] = 12))
How do we tell Power Query to take every record in the list and check if each row in my main query is equal to a value in the list? Please let me know if anyone has any suggestions or attempted to this in the past? Thank you all for your help.