Forum Discussion
Power Query | Combining binaries results in lost data from text file
Hello Cory,
I imported a folder with some copies of your text file into PowerQuery and attached the file to this post. The main steps I did are:
I created a query for one file first and setted it up, e.g. defining the delimiters as Wyn Hopkins did and changing the data types.The query is named qryImportFile in the sample file. Then I created the parameter Path, where you can input the path to your folder. On my computer this was D:\Downloads\Cory\Files. After then, I created from the first query qryImportFile a function, where I parametrized the filename and path. The function name is fctImportFile. If you look and compare the M-Code of the function with the query qryImportFile, then you see, that they are very similar and just wrapped by another statement. The next step was to create a query for importing a folder. This query is named qryImportFolder. There, I added a new user defined column and applied the function on it. This may be a little bit old style, but works.
Please let us know, if the attached Excel file including the queries works for you after changing the path. The path should have a trailing backslash.
Best,
Mourad