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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
How do I show all files within all the subfolders of the Automation folder? Ultimately I want to be able to show the parent folder name and modified date of each file.
let
Source = SharePoint.Contents("https://365.sharepoint.com/sites/C", [ApiVersion = 15]),
T = Source{[Name="T"]}[Content],
Control = T{[Name="Control"]}[Content],
Automation = Control{[Name="Automation"]}[Content]
in
#"Automation"
Solved! Go to Solution.
The way I've been able to get around this is this:
I had initally Expanded the Content field and then was unable to take it any further at the Expand Column option was removed.
It turns out that there were 2 "Binary" files at this level (Excel docs) that were stopping any further expansion.
After filtering them out I was able to Expand the Content.Content field and get to the level I needed and see all the file attributes for the docs I wanted.
While this solution gets me what I need it's nowhere near perfect and defintely a bit hack'ey in its application. If I had needed to include those filtered docs then I still wouldn't have a solution as to how to get to the level below while still retaining the files from the level above.
My Query now looks like this:
The way I've been able to get around this is this:
I had initally Expanded the Content field and then was unable to take it any further at the Expand Column option was removed.
It turns out that there were 2 "Binary" files at this level (Excel docs) that were stopping any further expansion.
After filtering them out I was able to Expand the Content.Content field and get to the level I needed and see all the file attributes for the docs I wanted.
While this solution gets me what I need it's nowhere near perfect and defintely a bit hack'ey in its application. If I had needed to include those filtered docs then I still wouldn't have a solution as to how to get to the level below while still retaining the files from the level above.
My Query now looks like this:
Hi @FM-Rad10 ,
I think you can just remove the [Content] part from the end of the Automation step.
Pete
Proud to be a Datanaut!
Sadly it just shows the attributes from the Automation folder and nothing else.
Ah, ok. Try changing SharePoint.Contents to SharePoint.Files.
You should then be able to filter [Folder Path] on Text.Contains([Folder Path], "/Automation/".
Pete
Proud to be a Datanaut!
well, after thinking that was the solution and even though it does work it's unusable as it's taken a report that refreshes in 3 mins to refreshing in 33 minutes.
I'm now wondering if there's a way to extract the path from the step I'm on and using that within Folder.Files or something similar to show the required data. I've not come across a way yet.
I had hoped to avoid Sharepoint.Files as it's so cumbersome but I think you're right. I can't seem to find a way of being able to apply a recursive search or jump from SP.Contents to SP.Files when I'm at the Automation folder.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |