Forum Discussion
MichaelHutchens
4 years agoHelper V
Loading multiple SharePoint document tables into the same query
Hi folks, I'm hoping someone might be able to assist. I have a single SharePoint site with multiple document libraries. Each library has identical columns, but is used for different document types...
- 4 years ago
You can filter based on [Title] and then expand on [Items] like this:
let Source = Table.Combine( { SharePoint.Tables("https://SITE_URL_GOES_HERE/", [ApiVersion = 15]) } ), #"Filtered Rows" = Table.SelectRows(Source, each ([Title] = "Communications" or [Title] = "Forms" or [Title] = "Guides" or [Title] = "Images" ) ), #"Expanded Items" = Table.ExpandTableColumn( #"Filtered Rows", "Items", {"Title", "Created"}, {"Title", "Created"} ) in #"Expanded Items"Replace "Title" and "Modified" with whatever columns you actually want.
AlexisOlson
4 years agoSuper User
You can filter based on [Title] and then expand on [Items] like this:
let
Source = Table.Combine(
{
SharePoint.Tables("https://SITE_URL_GOES_HERE/", [ApiVersion = 15])
}
),
#"Filtered Rows" = Table.SelectRows(Source, each
([Title] = "Communications" or
[Title] = "Forms" or
[Title] = "Guides" or
[Title] = "Images"
)
),
#"Expanded Items" = Table.ExpandTableColumn(
#"Filtered Rows", "Items",
{"Title", "Created"},
{"Title", "Created"}
)
in
#"Expanded Items"
Replace "Title" and "Modified" with whatever columns you actually want.
MichaelHutchens
4 years agoHelper V
Fabulous, that's perfect - thanks so much AlexisOlson 🙂