Data Source Dynamic Parameter

Jefe187

New Member
Joined
Oct 24, 2015
Messages
13
Fairly new to Power Query or the get data function. I am trying to set up a query from an Odbc data source with a dynamic parameter for the Schema. The server will always remain the same however the Schema (not entirely sure what that is?) is what will change then the table name will remain the same. I manually connected to it and attached the advanced editor below. The Z2A1 is constant and the INV table is always the table name, it is the A2$ schema that will need to change. I would loveto have this in a parameter that a user can input the correct schema whether isit A2$, A3$, etc and then refresh the query to get the updated INV table. Can anyone help with directions how to do this or is there an existing thread withinstructions? Many thanks in advance.




let
Source = Odbc.DataSource("dsn=Z2A1", [HierarchicalNavigation=true]),
#"A2$_Schema" = Source{[Name="A2$",Kind="Schema"]}[Data],
INV_Table = #"A2$_Schema"{[Name="INV",Kind="Table"]}[Data]
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Watch MrExcel Video

Forum statistics

Threads
1,118,049
Messages
5,569,884
Members
412,298
Latest member
dietitiann
Top