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

Dataset will not refresh

I have a simple Dataset that contains 2 tables. one table has a list of all my databases and the other is a dynamic function (see code below). I Invoke a custom function on database single column table. I assign the single column to my "DatabaseText" variable and everything works great. BUT

 

When I publish this to the service and try to schedule a refresh I get this error "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. " I believe you can use "[Relative path" to get around this but I don't know how. Can someone help me? If you can't use "Relative Path", then is there another solution. The power query is looping through every database and providing me all the dependencies. See my power query code below:

 

= (DatabaseText as text) =>

let
Source = Sql.Database("az-pdwsqls01", DatabaseText, [Query="SELECT OBJECT_NAME(referencing_id) AS referencing_entity_name, #(lf) o.type_desc AS referencing_desciption, #(lf) COALESCE(COL_NAME(referencing_id, referencing_minor_id), '(n/a)') AS referencing_minor_id,#(lf)#(tab)s.name COLLATE DATABASE_DEFAULT aS schema_name,#(lf)#(tab)t.name COLLATE DATABASE_DEFAULT as view_name,#(lf) referencing_class_desc, referenced_class_desc, #(lf) referenced_server_name, referenced_database_name, referenced_schema_name, #(lf) referenced_entity_name, #(lf) COALESCE(COL_NAME(referenced_id, referenced_minor_id), '(n/a)') AS referenced_column_name, #(lf) is_caller_dependent, is_ambiguous #(lf)FROM sys.sql_expression_dependencies AS sed #(lf)LEFT JOIN sys.objects AS o ON sed.referencing_id = o.object_id#(lf)Left JOIN sys.views t#(lf)ON t.[object_id] = sed.referencing_id#(lf)LEFT JOIN sys.schemas s#(lf)on s.schema_id = t.schema_id"]),
#"Added Custom" = Table.AddColumn(Source, "Reference Database and Table Name", each [referenced_database_name] & "." & [referenced_entity_name]),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Reference Database and Table Name", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([referenced_entity_name] <> null)),
#"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"referenced_database_name", "REF Database Name"}, {"referenced_schema_name", "REF Schema Name"}, {"referenced_entity_name", "REF Object"}})
in
#"Renamed Columns"

1 ACCEPTED SOLUTION

Hi @Anonymous ,

The documentation describes:

If that warning is present in the Data Source Settings dialog that appears, then a dynamic data source that can't be refreshed in the Power BI service is present.

 

 

Best Regards
Community Support Team _ Polly

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

5 REPLIES 5
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have also found a similar post, please refer to it to see if it helps you.

Solved: Help: Dataset includes a dynamic data source error - Microsoft Power BI Community

 

If it still does not help, please provide a screenshot with the error.

 

Best Regards
Community Support Team _ Polly

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

Anonymous
Not applicable

@v-pn  Thank you for your quick response. The first article you posted does not help because I am not dealing with a folder. The second resource you suggest is dealing with "Web.Contents" so it is not helpful. I know about "RelativePath" and I know how to use it when using "Web.Contents". The problem is now I need to figure out how to use it with "sql.database" as you see in the "M Code" in my first post. Can you help me know how to update my M so that it will refresh?

error.png

Hi @Anonymous ,

Do you seem to use import to connect to sql.database?

Please have a check. To determine whether your dynamic data source can be refreshed, open the Data Source Settings dialog in Power Query Editor, and then select Data Sources In Current File. In the window that appears, look for the following warning message, as shown in the following image:

vpollymsft_0-1672887645650.png

Data refresh in Power BI - Power BI | Microsoft Learn

 

If the warning does not exist, please provide the screenshot.

 

Could you please provide you pbix file without privacy inforamtion for me to test?

 

Best Regards
Community Support Team _ Polly

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

Anonymous
Not applicable

@v-rongtiep-msft yes as you suggest I get that error. I am hoping there is a work around just like there is a work around for web.contents by using relative path? I will work to post the file. Thanks,

Hi @Anonymous ,

The documentation describes:

If that warning is present in the Data Source Settings dialog that appears, then a dynamic data source that can't be refreshed in the Power BI service is present.

 

 

Best Regards
Community Support Team _ Polly

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 Solution Authors
Top Kudoed Authors