Forum Discussion
Import Data from Folder with Files That Have Additional Headings
Hi LoremIpsum,
You can place those two kind of files in one folder, then in Power BI desktop get data use the Folder data source, then use Combine Files follow this article: Combine binaries in Power BI Desktop.
Best Regards,
Qiuyun Yu
v-qiuyu-msft I'm not sure that article helps. It specifically says at the end, "With the new behavior of combine binaries, you can easily combine all binaries within a given folder as long as they have the same file type and structure (as in, the same columns)."
Half of my files have less columns than the other have, although the half with less have the same columns as the other group. It's just that the other group has additional columns that I also want to keep.
- v-qiuyu-msft8 years agoCommunity Support
Hi LoremIpsum,
Have tried that Combine Files in desktop? Based on my test, when you click the Combine Files in Query Editor, then select the Excel which has additional column as sample, it will combine additional column as well, if some Excel file doesn't have this additional column, it will display as null value.
Best Regards,
Qiuyun Yu- MarcelBeug8 years agoCommunity Champion
If you combine files from a folder, you can choose which file should act as the example file.
You can try and choose one of the files that has all columns.
Possibly that will be enough to have all files imported correctly.
If not, you may need to specify that missing fields should be ignored.
Anyhow, you can give it a try. If you run into errors, please share these (well specified so we know what is going wrong in which step) so we can help finetuning your queries.
- LoremIpsum8 years agoRegular Visitor
I had tried your tip before posting without success. Here is what I get back: [Expression.Error] The key didn't match any rows in the table.
Another problem I forsee is my first file is always the shorter version, and the filenames change every day so I can't select the longer version file.