Forum Discussion
Replace the support request with something else for the portability of a request on other PCs
Hello,
I don't know if it's possible, but when importing files from a folder, powerquery creates a help request. This support query refers to a sample file that is the first file in the folder from which files are imported.
If you want to generalize the request and move it to another PC, it no longer works, because it does not find the Example file.
I don't know if it's possible, but is there a technique to include in powerquery the characteristics of the example file in order to be able to generalize the query and move it to several computers, by creating a parameter which corresponds to the folder of the PC where the files to be imported are placed.
How to replace the sample file, when importing a folder
thank you
Philippe
2 Replies
- AnonymousNot applicable
Hi PhilippeMuniesa ,
One possible approach is to keep the path consistent, and when the path of the native and another data source is consistent, it can be accessed normally.
Another solutions you can refer to are as follows:
Solved: Dynamic source table name in Power Query - Microsoft Power BI Community
Solved: Dynamic Data Source and Power Query syntax - Microsoft Power BI Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- PhilippeMuniesa
Resolver I
Thanks for your answer,
but obviously that's not what I'm looking for.
To be more specific, I created an excel file that uses powerquery to format the data, and then sends this formatted data to powerpivot.
So far nothing special.
My data consists of X text files, which are located in a folder. For the creation of my queries I used the import function from a powerquery folder, and everything works correctly. Subsequently, I want to be able to give this file to my colleagues so that they can use this workbook on our customers' PCs, or on their PCs, which have a different file structure.
To go find the folder where the files are located, no problem. With VBA I open a dialog box that allows you to select a folder, and I transfer this path as a powerquery parameter and the query begins with
= Folder.Files(Path_DNS_Files)
The problem I would like to solve is to replace the support request which refers to an example file which is on my disk, and which contains confidential data, by another technique.
For the moment, I have created another parameter also configurable from excel
Path_Param_Files, and the "sample file" helper query is changed to point to this file which is installed on every PC that needs to use this workbook
= Folder.Files(Path_Param_Files)
But what I would like, if possible, is to avoid sharing the example file due to data confidentiality, and even better integrate into powerquery a query or a function that replaces "queries for help" and which makes it possible to dispense with the "example file".Of course if this is not possible, I will tweak the example file to make it anonymous, but that does not seem to me to be an optimal solution.
Thank you for your help, and your ideas.
Philippe