Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

filtering library items



i'm having a library which consists of folders and files as below structure:




now i want to filter the items and folders except the level 0 folders i.e. HR,Sales,IT,Marketing except these folders i want to retrieve sub items and folders. 

i've tried something like filter(library,Not(isfolder)) which will only give items but it will not give folders and also using isfolder giving delegation 

Super User III
Super User III


There are no real folders or subfolders in SharePoint.  This is a trick of the view.  A library is really just a list like any other SharePoint list. In order to mimic a folder hierarchy, SharePoint uses the IsFolder and Folder Path to create this concept.

As such - all of these columns in SharePoint are "generated" columns and NONE of them are delegable.  So, if your Library is over 2000 items, then you will run into problems.


Now, if it is not, you can use something like this:

Filter(yourLibrary, CountRows(Split('Folder path', "/"))>2)

Top level items will have 2 results from the split, so everything bigger than that is lower level.


I hope this is helpful for you.


Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,505)