Forum Discussion

voidbydefault's avatar
3 years ago

[Not solved, giving up] Importing multiple files from a folder as separate tables in PQ?

Hello,

 

I have a bunch of files in a folder. Connecting PQ/BI to the folder imports all files (i.e. combines) them into one table. Is there are way that all those files import as different tables? 

 

Thanks.

2 Replies

  • adudani's avatar
    adudani
    Icon for Memorable Member rankMemorable Member

    hi voidbydefault ,

    1st approach : to my knowledge, before expanding the content of the files in the folder, the source name (file name ) could be expanded along with the data in the files.

     By duplicating the query and filtering the file name, you could get indiviual files loaded.

     

    2nd approach :Alternatively, you could connect to a single file and change the source after duplicating the query.

     

    Both are pretty manual so,  I wouldn't recomend it for a large number of files.

     

    Abit more of a dynamic approach is creating parameters of the file source and applying a filter step using the first approach. replace the parameter in the filter step based on the file required.

     

  • Thanks adudani. I have been tinkering around your suggestions, but unfortunately it seems there is no straight forward and feasiable way in PowerBI. I am exploring if Python could be leveraged to make the job 'somewhat' easier.