#"Filtered Rows" = Table.SelectRows(#"Changed Type", each = "Pencils"), Copy and paste in the following code then press the Done button. Open the Advanced Editor from either the Home tab or the View tab in the query editor. This will be how you call the values in your parameter table. Select From Other Sources then select Blank Query from the menu. Go to the Data tab in the ribbon and select Get Data in the Get & Transform Data section. Create A Query Function To Reference Your Parameter TableĬreate a blank query. To name a table select it and go to the Design tab and type in a new name under the Table Name: box. Name the table Parameters, this is how we will reference the table in our power query. We need to turn the parameter data into an Excel table by going to the Insert tab and selecting Table or by using the Ctrl + T keyboard shortcut. The Index and Parameter column are for information and are just there to remind me what row number a value is in (the Index) and a description of what the value is used for (the Parameter). The table I created has 3 columns, but it only really needs the Value column where the input value is. I want to have input parameters so I can easily update the folder path, file name, product, and date range that my query will be based on. For this query, I want to import a CSV from a folder and then filter on a given product and date range. Then we will parameterize the resulting query so we can easily update it. In this example we’re going to import some data in a CSV and do some minor transformations. This allows me to easily update folders, file names and other inputs in my queries. To avoid this, I like to set up a parameter table in my workbooks. If you want to update the folder path or file name to be imported then you need to go into the advanced editor and update the path and file name.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |