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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

After publishing to workspace I get a "dynamic data sources can't be refreshed" error

Love for some input on this error, I cannot go any lower in my analysis and the MS documentation for this error doesn't apply to my scenario, to the best of my knowledge.

 

File that replicates the error at it's most simplest: https://drive.google.com/file/d/1yHrty3HbUwFj3CaX6h-jmUZ3zUhq1iE1/view?usp=sharing 

 

I've isolated the problem in the abovefile, but basically I can't seem to use the Web.Contents function inside a custom function. I've isolated the problem and demonstrated it with both parameters and strings in the attached file (if you upload it to your personal workspace, you get the following error when trying to refresh the dataset file: 

Yx1fvk3

https://imgur.com/Yx1fvk3

 

This is the simplest version of the code that keeps failing (write the below then invoke with url string https://www.abs.gov.au/statistics/labour/employment-and-unemployment/labour-force-australia/mar-2021...😞

 

 

let
    Source = (Parameter1 as any) => let
    Source = Excel.Workbook(Web.Contents(Parameter1), null, true),
    Data1 = Source{[Name="A85255136K_Data"]}[Data]
in
    Data1
in
    Source

 

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try the code and parameter1 like this:

 

let
    Source = Excel.Workbook(Web.Contents("https://xxx/xxx/labour/employment-and-unemployment/labour-force-australia/",[RelativePath=Parameter1]), null, true),
    A85255136K_Data1 = Source{[Name="A85255136K_Data"]}[Data],
    #"Kept First Rows" = Table.FirstN(A85255136K_Data1,1)
in
    #"Kept First Rows"

 image.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try the code and parameter1 like this:

 

let
    Source = Excel.Workbook(Web.Contents("https://xxx/xxx/labour/employment-and-unemployment/labour-force-australia/",[RelativePath=Parameter1]), null, true),
    A85255136K_Data1 = Source{[Name="A85255136K_Data"]}[Data],
    #"Kept First Rows" = Table.FirstN(A85255136K_Data1,1)
in
    #"Kept First Rows"

 image.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors