Forum Discussion
MichaelHutchens
4 years agoHelper V
Combining multiple SharePoint SitePage libraries into a single query
Hi everyone, I manage an intranet with 10 subsites. I'm looking to create a single PowerBI table that combines basic information from every library, without having to load every single library and th...
- 4 years ago
Then you should be able to write a query along these lines:
let Source = Table.Combine( { SharePoint.Tables("https://URL/sites/sitename1/", [ApiVersion = 15]), SharePoint.Tables("https://URL/sites/sitename2/", [ApiVersion = 15]), SharePoint.Tables("https://URL/sites/sitename3/", [ApiVersion = 15]) } ), #"Filtered Rows" = Table.SelectRows(Source, each ([Title] = "Site Pages")), #"Expanded Items" = Table.ExpandTableColumn(#"Filtered Rows", "Items", {"File"}, {"File"}), #"Expanded File" = Table.ExpandRecordColumn(#"Expanded Items", "File", {"ServerRelativeUrl"}, {"File.ServerRelativeUrl"}), #"Removed Other Columns" = Table.SelectColumns(#"Expanded File",{"File.ServerRelativeUrl"}) in #"Removed Other Columns"
AlexisOlson
4 years agoSuper User
I'm pretty sure you'll have to call SharePoint.Tables("URL",...) for each separate site but you can still do that in a single query if you want to.
It looks like you're loading a specific list. Is there an analogous one in each site with the same/similar Title?