Forum Discussion

SinghVikas27's avatar
SinghVikas27
New Member
1 year ago
Solved

Guidance Required: Load Multiple Subfolders as Separate Tables in Power Query

I have a parent SharePoint folder containing multiple subfolders. Each subfolder has different file types/structures, and I want to load each subfolder files as a separate dataset in Power Query inst...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi SinghVikas27 ,

    Thanks for raising this! The steps the super user shared will definitely help organize the files by subfolder, but it isn’t fully dynamic you’d still need to “drill down” again whenever a new subfolder shows up.
    If you want a 100% dynamic setup (so new subfolders automatically become separate datasets without manual work), the approach is:
    1. Connect once to the parent SharePoint folder.
    2. Extract subfolder names from the [Folder Path].
    3. Group by subfolder.
    4. Turn your transformation into a function, then invoke that function for each subfolder dynamically.
    That way, whenever a new subfolder appears, the query automatically picks it up on refresh.

    Regards,
    Akhil.