Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Populate Power BI columns based on SharePoint folder structure

Hi,

 

I have a requirement where I have to set up a folder structure on SharePoint and integrate it with Power BI so that the files stored in the folders are imported based on a refresh schedule/ manually. As part of the data import, I need to automatically populate couple of dimensions/ columns in the data model based on the SharePoint folder structure. For instance, if I have separate files placed in the below folder structure, and I have files that have lets say 10 columns of data (excel files AA and BB below). I need to pull the value 'Folder A' in a NEW column that is merged with the imported data adding an 11th column for all the records.

 

https://XXX.sharepoint.com/sites/RootFolder/Folder A/file AA.xlsx

https://XXX.sharepoint.com/sites/RootFolder/Folder B/file BB.xlsx

 

Any help will be greatly appreciated.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , refer how to add the folder name

https://community.powerbi.com/t5/Desktop/Folder-name-to-Column/td-p/600676

https://www.sqlservercentral.com/blogs/include-file-name-in-content-using-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
ibarrau
Super User
Super User

Hi, this post might help for Sharepoint navigation https://blog.ladataweb.com.ar/post/627427136962281472/powerbi-obtener-datos-de-una-carpeta-de Hope it helps,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

amitchandak
Super User
Super User

@Anonymous , refer how to add the folder name

https://community.powerbi.com/t5/Desktop/Folder-name-to-Column/td-p/600676

https://www.sqlservercentral.com/blogs/include-file-name-in-content-using-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.