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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
AndreSatziack
Helper I
Helper I

How to use RelativePath for refresh with dynamic data sources

I have a great challenge, where I would like to share it with my friends here at the Forum.

I need to automatically update my online report but I get the error for being a dynamic query, I researched about using Web.Contents with RelativePath but I couldn't make it work yet, by chance, does anyone know to inform me if the advanced query below is compatible with RelativePath to Refresh through the Power Bi Online service?
Thank you my friends.

let
    BaseURL = "https://api.tiflux.com/api/v1/clients",
    ExtraParams = "",
    Pages = List.Generate(
        () => [PageNumber=1, Func=fnGetPage(BaseURL, PageNumber, ExtraParams)],
            each Table.RowCount([Func]) > 0,
            each [PageNumber=_[PageNumber]+1, Func=Function.InvokeAfter(()=> fnGetPage(BaseURL, PageNumber, ExtraParams), #duration(0,0,0,10))],
            each _[Func]),
    #"ResultTable" = Table.FromList(Pages, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    Table = Table.Buffer(Table.ExpandTableColumn(#"ResultTable", "Column1", Table.ColumnNames(Table.Combine(#"ResultTable"[Column1])))),
    #"Renamed Columns" = Table.RenameColumns(Table,{{"name", "Empresa"}})
in
    #"Renamed Columns"
3 REPLIES 3
lbendlin
Super User
Super User

In Power Query Editor find the code for that query and then incorporate the code into the one you posted.

lbendlin
Super User
Super User

instead of calling 

fnGetPage

try to inline its code in your script.

Hello my friend =D

Thank you for answer me, let me ask you, I was using fnGetPage in the code, exemple, but how can I write the right sentence for Power Bi Service understand that is a web data source and work with auto refresh? I don't understand very well this query =/

 

 Func=fnGetPage(BaseURL, PageNumber, ExtraParams)]

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Kudoed Authors