Forum Discussion
Torben Kirk Wolf
Jul 06, 2021Brass Contributor
Relinking Transform Sample File query with function in Power Query?
Hi all, When transforming a sample file, e.g. as part of a Folder query, it really is neat that Power Query automatically creates a sample file parameter and especially a custom function that aut...
- Jun 09, 2022
Hi,
I was just trying to resolve the same problem and came across your post. I found a way to do it- Sort of... It's a little clunky but works. This was the only way I could determine to "relink" after searching forever online with no resolution so I figured I would pass it along.
- Open the "Transform Sample File" in the query editor.
- Once the editor opens right-click on "Transform Sample File" under the queries pane on the left.
- In the pop-up menu click "Create Function". You will have to name it something different than what it was previously. Save.
- Edit your main queries to replace the function reference(s) with the new function name.
- Optional Clean-up. A new sub-folder is created by step 3. If you want everything back to one folder just move the items in the new sub-folder into the original sub-folder and delete the new sub-folder once it's empty. Also delete the old disconnected function.
E_Lancaster
Jun 09, 2022Copper Contributor
Hi,
I was just trying to resolve the same problem and came across your post. I found a way to do it- Sort of... It's a little clunky but works. This was the only way I could determine to "relink" after searching forever online with no resolution so I figured I would pass it along.
- Open the "Transform Sample File" in the query editor.
- Once the editor opens right-click on "Transform Sample File" under the queries pane on the left.
- In the pop-up menu click "Create Function". You will have to name it something different than what it was previously. Save.
- Edit your main queries to replace the function reference(s) with the new function name.
- Optional Clean-up. A new sub-folder is created by step 3. If you want everything back to one folder just move the items in the new sub-folder into the original sub-folder and delete the new sub-folder once it's empty. Also delete the old disconnected function.
M_Wing
Jul 14, 2024Copper Contributor
many many thanks for this!