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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
TK12345
Resolver II
Resolver II

Help with syntax -'One or more table references a dynamic Data Source. Not able to save dataflow'

Hi there, 
I have an API that I want to paginate in a Power BI Dataflow. I tried this code in the desktop (dataset) and it refreshes fine. It also shows data in the dataflow but when I close the dataflow I get the error message: One or more table references a dynamic Data Source. Not able to save Dataflow. 

So I have the followings queries/functions/parameters in the dataflow:
1 parameter where I provide my BaseURL              (https://www.cannotshow.nl)

1 parameter where I provide my Bearer token        (Bearer abcdefgheijklmnop)
1 Function called TEST:

 

(currentPage as number) =>

let
    Source = Json.Document(Web.Contents(BaseURL,
                                        [RelativePath ="/test.test/rest/all/V1/orders?searchCriteria[pageSize]=10&searchCriteria[currentPage]="&Number.ToText(currentPage)] &
                                        [Headers=[Authorization=Authentication]]))

in
   Source

1 query that shows me the data:

let
  Source = List.Generate(()=>
[Result= try TEST(0) otherwise null, currentPage=0],
each [Result]<>null,
each [Result= try TEST([currentPage]+1) otherwise null, currentPage=[currentPage]+1],
each [Result]),
  #"Geconverteerd naar tabel 1" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
  #"Uitgevouwen Column1" = Table.ExpandRecordColumn(#"Geconverteerd naar tabel 1", "Column1", {"items"}, {"items"}),
  #"Uitgevouwen items" = Table.ExpandListColumn(#"Uitgevouwen Column1", "items"),
  #"Uitgevouwen items 1" = Table.ExpandRecordColumn(#"Uitgevouwen items", "items", {"weight"}, {"weight"})
in
  #"Uitgevouwen items 1"

So the question is:

WHY do I get the Can't save dataflow error? I can see the data is loaded in. Some people with the same issues fixed it by using RelativePath, but in my case it still does not work. What do I need to change in the code so my dataflow will save and refresh. 

Do I have to change something in the Relative Path or what do I need to do? Who could help me out?

 

2 ACCEPTED SOLUTIONS

Put the query pairs into the Query section, not the Relative path section.

View solution in original post

Thanks, that did the trick.

Solved it like this:

(Page as number) as table=>

let
  Source =
  Json.Document(
    Web.Contents("https://www.cannotshow.nl",
    [RelativePath = "/test.test/rest/all/V1/orders",
    Query = [
      #"searchCriteria[pageSize]" = Text.From(10),
      #"searchCriteria[currentPage]" = Number.ToText(Page)
      ],
      Headers=[
       #"Authorization" = "Bearer abcdefgheijklmnop"
    ]])

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

You specified the query as part of the RelativePath.  Try specifying it separately as the documentation suggests.

Hi Ibendlin, 

Thanks for your reply, I thought I did what the documentation suggests. What do you mean I specified the query as part of the RelativePath, and how do you suggest to change it?

Put the query pairs into the Query section, not the Relative path section.

Thanks, that did the trick.

Solved it like this:

(Page as number) as table=>

let
  Source =
  Json.Document(
    Web.Contents("https://www.cannotshow.nl",
    [RelativePath = "/test.test/rest/all/V1/orders",
    Query = [
      #"searchCriteria[pageSize]" = Text.From(10),
      #"searchCriteria[currentPage]" = Number.ToText(Page)
      ],
      Headers=[
       #"Authorization" = "Bearer abcdefgheijklmnop"
    ]])

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.