Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

"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??