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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

"Dataset includes a dynamic data source" Dynamic date in Web Source (No API)

I can't refresh dataset once it's been published because of this error. I cannot seem to find a workaround that suits my needs.

 

The below example is grabbing a table from the web successfully in power BI desktop. Publishing the dataset works fine but cannot be refreshed from there without manually refreshing it in desktop and then re-publishing. I would like to be able to schedule refreshes without having to open PBI.

Source = Web.Contents("https://www.example.com/data/type/date:"&Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd"))

 

I get the typical "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." error

 

Can anyone help?

8 REPLIES 8
PhilipTreacy
Super User
Super User

@Anonymous 

 

Hard to say without seeing all of the code.

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Phil,

 

This is the code grabbing the table directly from the webpage:

 

 

let
Source = Web.BrowserContents("https://www.example.com/data/type/date:2023-06-26"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR > :nth-child(1)"}, {"Column2", "TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR > :nth-child(2)"}, {"Column3", "TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR > :nth-child(3)"}}, [RowSelector="TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR"]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Datetime", type datetime}, {"Category", type text}, {"Release", type text}})
in
    #"Changed Type"

 

 

Changes as per your recommendation:

 

 

let
Origen = Json.Document(
    Web.Contents(
        "https://www.example.com/data/type/date:", 
        [RelativePath=Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd")]
    )
),
    #"Extracted Table From Html" = Json.Document(Origen, {{"Column1", "TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR > :nth-child(1)"}, {"Column2", "TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR > :nth-child(2)"}, {"Column3", "TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR > :nth-child(3)"}}, [RowSelector="TABLE.table.table-bordered.table-condensed.table-hover.table-fixed.pre-date-details-list > * > TR"]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Datetime", type datetime}, {"Category", type text}, {"Release", type text}})
in
    #"Changed Type"

 

 

This returns  DataSource.Error: The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server.

 

 

Hi @Anonymous 

 

Can you confirm by trying to access that URL in your browser, that it's actually returning JSON?

 

The error is saying you are getting HTML returned, instead of JSON.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

It is an HTML webpage.

PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

The root URL can't be dynamic, it needs to be a fixed string.  You can supply dynamic parts of the URL using RelativePath like this

Origen = Json.Document(
    Web.Contents(
        "https://www.example.com/data/type/date:", 
        [RelativePath=Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd"]
    )
),

 

 

regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Phil, 

 

Thanks for your response, I'm running into a new issue with that - "Expression.SyntaxError: Token ',' expected."

 

Any ideas, on how to resilve that?

PCx_0-1687767010577.png

 

Hi

 

...[RelativePath=Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd")])),

Stéphane 

Anonymous
Not applicable

Hi Stéphane, 

 

Thanks, I tried this and got this new error: 

DataSource.Error: The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.