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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SenPower
Frequent Visitor

Power BI Refresh Error

Hi Guys, 

I am kinda new to M Code and trying to learn along the way. I trying to set up schdule refresh with my data set but i get the error message below..... i have also provided the Code with i run from the API. If anyone can help me to solve this issue?

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.

M Code = 

let
// Source
source = "https://app.*******-****.com/api/v1/service",
apiKey = ************,

 

    // Data extracting from each page

    GetPage = (PageNumber as number) =>

        let

            url = source & "?" & "page=" & Number.ToText(PageNumber),

            headers = [ #"Authorization" = "Bearer " & apiKey ],

            response = Web.Contents(url, [Headers=headers]),

            json = Json.Document(response),

            data = json[data],

            nextPage = json[meta][pagination][next_page]

        in

            if List.Count(data) = 0 then null else data,

 

    // Looping through each pages

    GetAllPages = List.Generate(

        () => [Page = 1, Data = GetPage(1)],

        each [Data] <> null,

        each [Page = [Page] + 1, Data = GetPage([Page])],

        each [Data]

    ),

 

    // Pages into Table

    AllData = List.Combine(GetAllPages)

in

    AllData

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SenPower ,

In most cases, Power BI semantic models that use dynamic data sources can't be refreshed in the Power BI service. There are a few exceptions in which dynamic data sources can be refreshed in the Power BI service, such as when using the RelativePath and Query options with the Web.Contents M function. Queries that reference Power Query parameters can also be refreshed.

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 warning message, as shown in the following image:

vjunyantmsft_0-1728532896337.png


Refer to, which describes how to set a scheduled refresh on a dynamic data source in Power BI:
https://medium.datadriveninvestor.com/setting-a-scheduled-refresh-on-a-dynamic-data-source-in-power-... 

Here are some posts where other users have solved the same problem. You can refer to the solutions:
Solved: Help: Dataset includes a dynamic data source error - Microsoft Fabric Community
Solved: Dynamic data sources aren't refreshed in the Power... - Microsoft Fabric Community
Solved: Power BI Service with dynamic data sources - Microsoft Fabric Community

Best Regards,
Dino Tao
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

2 REPLIES 2
SenPower
Frequent Visitor

Thank you! It worked. 
I have just set up the paths correctly using RelativePath. 


Anonymous
Not applicable

Hi @SenPower ,

In most cases, Power BI semantic models that use dynamic data sources can't be refreshed in the Power BI service. There are a few exceptions in which dynamic data sources can be refreshed in the Power BI service, such as when using the RelativePath and Query options with the Web.Contents M function. Queries that reference Power Query parameters can also be refreshed.

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 warning message, as shown in the following image:

vjunyantmsft_0-1728532896337.png


Refer to, which describes how to set a scheduled refresh on a dynamic data source in Power BI:
https://medium.datadriveninvestor.com/setting-a-scheduled-refresh-on-a-dynamic-data-source-in-power-... 

Here are some posts where other users have solved the same problem. You can refer to the solutions:
Solved: Help: Dataset includes a dynamic data source error - Microsoft Fabric Community
Solved: Dynamic data sources aren't refreshed in the Power... - Microsoft Fabric Community
Solved: Power BI Service with dynamic data sources - Microsoft Fabric Community

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors