Forum Discussion
Getting 'One or more table references a dynamic Data Source' even with Web.Contents with Relativepat
Its giving the same error, I started with trying to do it with Standard SharePoint List connector and thats why I tried to do it with Web.Contents
In the code you posted "Source0" is not referenced later on, so it won't be executed anyway.
Please avoid sorting tables in Power Query if possible - it is a very expensive operation that breaks spooling.
Can you please describe what kind of business problem you are attempting to solve?
- kroman1 year agoHelper II
You realy need to learn to pay attention 🙂
Source0 referenced in line 14 -value = Source0[value],
Sorting table is nothing to do with a problem
Problem clearly described in a post subject and description - "Getting 'One or more table references a dynamic Data Source' even with Web.Contents with Relativepat"- lbendlin1 year agoSuper User
You're correct, I missed that line.
Can you please post the refactored code that uses SharePoint.List instead of the API call?
Power Query SharePoint list connector - Power Query | Microsoft Learn
- kroman1 year agoHelper II
let Source0 = SharePoint.Tables("https://MyOrg.sharepoint.com/sites/DigitalWorkplaceReporting", [Implementation="2.0", ViewMode="All"]), #"ffdf74ed-79dd-4c01-a2f3-14bead82700f" = Source0{[Id="ffdf74ed-79dd-4c01-a2f3-14bead82700f"]}[Items], #"Filtered Rows" = Table.SelectRows(#"ffdf74ed-79dd-4c01-a2f3-14bead82700f", each ([StatusN] = 1)), TheSite = Table.First(#"Filtered Rows")[SiteUrl], Source = SharePoint.Files(TheSite, [ApiVersion = 15]), #"Sorted rows" = Table.Sort(Source, {{"Date created", Order.Ascending}}), #"Filtered rows" = Table.SelectRows(#"Sorted rows", each [Date modified] < #datetime(2017, 5, 1, 0, 0, 0)), #"Sorted rows 1" = Table.Sort(#"Filtered rows", {{"Date modified", Order.Ascending}}), #"Expanded Attributes" = Table.ExpandRecordColumn(#"Sorted rows 1", "Attributes", {"Size"}, {"Size"}), #"Changed column type" = Table.TransformColumnTypes(#"Expanded Attributes", {{"Size", type number}}), #"OldFiles" = Table.Sort(#"Changed column type", {{"Size", Order.Descending}}), #"Removed Columns" = Table.RemoveColumns(OldFiles,{"Content"}) in #"Removed Columns"