Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Dynamic Data Source Error in Power Query

I'm getting Dynamic Data Source error in Power Query as below :
"Some data sources may not be listed because of hand-authored query"

 

and below is my code; How should I modify it?

let
BaseUrl = "https://yourdomain.udemy.com/api-2.0/organizations/224484/analytics/user-course-activity/",
EntitiesPerPage = 100,

GetJson = (Url) =>
let Options = [Headers=[ #"Authorization" = "Token"]],
RawData = Web.Contents(Url, Options),
Json = Json.Document(RawData)
in Json,

GetEntityCount = () =>
let Url = BaseUrl,
Json = GetJson(Url),
Count = Json[#"count"]
in Count,

GetPage = (Index) =>
let Page = "?&page=" & Text.From(Index),
Page_Size = "&page_size=100",
Url = BaseUrl & Page & Page_Size,
Json = GetJson(Url),
Value = Json[#"results"]
in Value,

EntityCount = List.Max({ EntitiesPerPage, GetEntityCount() }),
PageCount = Number.RoundUp(EntityCount / EntitiesPerPage),
PageIndices = {1 .. PageCount},
Pages = List.Transform(PageIndices, each GetPage(_)),
Entities = List.Union(Pages),
Table = Table.FromList(Entities, Splitter.SplitByNothing(), null, null, ExtraValues.Error),

6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

Dear  Syndicate,
Thanks for your response.

Actually, error happens when we want to refresh the dashboard on Power BI Service, as below. 
I've also attached error screenshot. 

Error Message:
"This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed in the Power BI service, this dataset won't be refreshed. " 

lbendlin
Super User
Super User

That's not an error, only a note.  Do you have an actual issue with the query?

Dear  Syndicate,
Thanks for your response.

Actually, error happens when we want to refresh the dashboard on Power BI Service, as below. 
I've also attached error screenshot. 

Error Message:
"This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed in the Power BI service, this dataset won't be refreshed. " 

Please read the documentation of Web.Contents - you need to use the Query parameter.

Yeah, I know  but unfortunately I don't know how exactly I should do that. Can you modify the M code that I've mentioned above?

you would need to add a second parameter to the GetJSON function.

 

GetJson = (Url,q) =>
let Options = [Headers=[ #"Authorization" = "Token"],Query=q],
RawData = Web.Contents(Url, Options),
Json = Json.Document(RawData)
in Json,

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.