Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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 instead of combining them into one query.
Is there a dynamic way to connect to the parent folder only once and then split the data so that each subfolder becomes its own query/table in Power BI, without manually connecting to each subfolder or duplicating it one by one?
Solved! Go to Solution.
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.
Hi @SinghVikas27 ,
I hope the guidance shared was useful in getting this sorted. If everything is resolved, that’s great but if you still run into any questions, feel free to let us know and we’ll be glad to help further.
Regards,
Akhil.
Hi @SinghVikas27 ,
Circling back were you able to test the dynamic setup with new subfolders yet? If it’s still not picking them up automatically, could you share a quick example of your folder structure? That’ll help narrow down whether we need to tweak the query or add a step to handle edge cases.
Regards,
Akhil.
Hi @SinghVikas27 ,
Just checking back in. Did you get a chance to try the solution I shared above?
The idea was to make the setup fully dynamic, so whenever a new subfolder appears it’s automatically picked up on refresh. That way, you don’t need to drill down manually each time a new folder shows up. Would be great to hear if this worked in your scenario, or if you’re still running into challenges.
Happy to help fine-tune further if needed.
Regards,
Akhil
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.