Forum Discussion
"One or more entities references a dynamic data source."
Hi there. I am relatively new to the Power Query language. Currently, I have a Power Query that works perfectly when used in Excel or Power BI and uses a function and a query. However, when I drop this same code into PowerBI webservice as a Dataflow, I get the error "One or more entities references a dynamic data source." The Table query works in Dataflow without throwing an error, but then I'm unable to paginate my results. The function query seems to be my issue.
Here is the function query:
(page as text) =>
let
Source = Xml.Tables(Web.Contents("https://myurl/myreport.xml?page=" & page, [Headers=[#"username"="my_username", #"password"="my_password"]])),
Table1 = Source{1}[Table],
Table0 = Table1{0}[Table],
#"Changed Type" = Table.TransformColumnTypes(Table0,{{"date", type datetimezone}, {"amount", type number}, {"amount2", type number}, {"type", type text}, {"description", type text}})
in
#"Changed Type"
Here is the Table query:
let
Source = Xml.Tables(Web.Contents("https://myurl/myreport.xml", [Headers=[#"username"="my_username", #"password"="my_password"]])),
Table0 = Source{0}[Table],
#"Changed Type" = Table.TransformColumnTypes(Table0,{{"path", type text}, {"receivedat", type datetimezone}, {"endrow", Int64.Type}, {"resourcename", type text}, {"isprivate", Int64.Type}, {"page", Int64.Type}, {"startrow", Int64.Type}, {"timezone", type text}, {"x-format-date", type logical}, {"pagecount", Int64.Type}, {"recordcount", Int64.Type}}),
pagecount1 = #"Changed Type"{0}[pagecount],
#"Converted to List" = {1..pagecount1},
#"Converted to Table" = Table.FromList(#"Converted to List", Splitter.SplitByNothing(), null, null, ExtraValues.Ignore),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Page"}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Page", type text}}),
#"Invoked Custom Function" = Table.AddColumn(#"Changed Type1", "getData", each getData([Page]))
in
#"Invoked Custom Function"
Any help??
1 Reply
- AnonymousNot applicable
Hi Anonymous
Please refer to this blog for more details about dynamic data source: Refresh and dynamic data sources
I found an issue like yours : Bug? “Can’t save dataflow. Same queries work in Power BI Desktop
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.