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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
SteveKWWHA
Frequent Visitor

Sharepoint Folders and Items in Folders

Hi All

 

As an audit requirment tasked to me, i need to generate a list of all the folders within a document library, the sub folders and whether they have any items (or count of how many items exist in that folder)

 

I can connect to the site > access the folders but it is only giving me a list of the folders where a file exists. Ideally, what i want to produce is a report showing: 

 

Folder name

Sub Folder Name

Items in Sub Folder

 

Not sure if this is possible but if someone does know ny help would be greatly appreciated

 

Thanks

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @SteveKWWHA,

According to your description, I think folder connector should suitable for your requirements(get detail information of a specific path and its child)but it only works on 'absolute path' and does not compatible with dynamic web URL.

For this scenario, I'd like to suggest you to use external tools(e.g. PowerShell or programming language) to export detail SharePoint folder contents and save to local file, then you can use power bi to get data from that file.

In addition, you can also try to use power query to invoke python code with iterator function to looping detail contents of a directory.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @SteveKWWHA,

According to your description, I think folder connector should suitable for your requirements(get detail information of a specific path and its child)but it only works on 'absolute path' and does not compatible with dynamic web URL.

For this scenario, I'd like to suggest you to use external tools(e.g. PowerShell or programming language) to export detail SharePoint folder contents and save to local file, then you can use power bi to get data from that file.

In addition, you can also try to use power query to invoke python code with iterator function to looping detail contents of a directory.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
tkirilov
Resolver I
Resolver I

Hi @SteveKWWHA ,

 

I don't think Power BI alone can do that, but I am aware that there is a way of achieving that using PowerShell. I found this article (link below), which seems to describe how to achieve what you are looking for, but I must admit I don't know much about PowerShell.

 

https://www.sharepointdiary.com/2018/08/sharepoint-online-powershell-to-get-all-files-in-document-li...

 

Best,

Tom

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.