Forum Discussion
Power Query | Combining binaries results in lost data from text file
Also take a look at this article by Ken Puls
It may help you understand how things have changed
http://www.excelguru.ca/blog/2016/12/21/new-combine-binaries-experience/
- Wyn HopkinsMar 18, 2017MVP
Hi Corey
I've pulled together a step by step guide of what you need to do in the attached excel file
(my screen shots are from Power BI desktop but it should be the same for Excel)
- Cory BarnesMar 20, 2017Copper ContributorHi Wyn, Are you importing a single text file or multiple (this is what I am trying to do for the consolidation)? I get the options you reference when importing a single file but not when importing multiple text files from a folder. There is no gear even present.
- Wyn HopkinsMar 21, 2017MVP
Hi Corey
I've just downloaded the latest version of Power Query into Excel 2013 and the source cog is showing on my version?
What version of Excel and Power Query are you using?
- DeletedMar 17, 2017
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
- Cory BarnesMar 20, 2017Copper ContributorI believe I may have been able to get this to work using the queries you created along with the pre-work completed by Wyn Hopkins. I will try the consolidation tomorrow and confirm the numbers appear to line up and report back. Thanks all!