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
yforti
Helper II
Helper II

Refresh dynamic date

Hey guys!

I'm working on a data model that consumes an api, where I need to do the pagination of this api.

I did the pagination the way below and everything worked fine, however, when I publish it to my workspace I can't update it.


I receive the following error:
"This dataset includes a dynamic data source. Because dynamic data sources are not updated in the Power BI service, this dataset will not be updated. Learn more: https://aka.ms/dynamic-data-sources."

let
    Consulta1 = let
_GetAPIPageData = (offset as number) =>
let
    Fonte = Json.Document(Web.Contents("urlofapi?Take=1000&Page..."&Number.ToText (offset))),
    #"Convertido para Tabela" = Table.FromRecords({Fonte}),
    #"data Expandido" = Table.ExpandRecordColumn(#"Convertido para Tabela", "data", {"hasValue", "value"}, {"data.hasValue", "data.value"}),
    #"data.value Expandido" = Table.ExpandRecordColumn(#"data Expandido", "data.value", {"quantidadeTotalRegistros", "quantidadeTotalPaginas", "relatorioDebitoModel"}, {"data.value.quantidadeTotalRegistros", "data.value.quantidadeTotalPaginas", "data.value.relatorioDebitoModel"}),
    #"Tipo Alterado" = Table.TransformColumnTypes(#"data.value Expandido",{{"data.hasValue", type logical}, {"data.value.quantidadeTotalRegistros", Int64.Type}, {"data.value.quantidadeTotalPaginas", Int64.Type}, {"data.value.relatorioDebitoModel", type any}, {"messages", type any}, {"hasError", type logical}}),
    #"data.value.relatorioDebitoModel Expandido" = Table.ExpandListColumn(#"Tipo Alterado", "data.value.relatorioDebitoModel"),
    #"data.value.relatorioDebitoModel Expandido1" = Table.ExpandRecordColumn(#"data.value.relatorioDebitoModel Expandido", "data.value.relatorioDebitoModel", {"id", "adquirente", "transacao", "bandeira", "servico", "maquineta", "modalidade", "banco", "dataVenda", "dataCreditoRepasse", "dataBaixa", "valorBruto", "valorTarifa", "nsu", "autorizacao", "resumoDeVendas", "numCartao", "nsa"}, {"data.value.relatorioDebitoModel.id", "data.value.relatorioDebitoModel.adquirente", "data.value.relatorioDebitoModel.transacao", "data.value.relatorioDebitoModel.bandeira", "data.value.relatorioDebitoModel.servico", "data.value.relatorioDebitoModel.maquineta", "data.value.relatorioDebitoModel.modalidade", "data.value.relatorioDebitoModel.banco", "data.value.relatorioDebitoModel.dataVenda", "data.value.relatorioDebitoModel.dataCreditoRepasse", "data.value.relatorioDebitoModel.dataBaixa", "data.value.relatorioDebitoModel.valorBruto", "data.value.relatorioDebitoModel.valorTarifa", "data.value.relatorioDebitoModel.nsu", "data.value.relatorioDebitoModel.autorizacao", "data.value.relatorioDebitoModel.resumoDeVendas", "data.value.relatorioDebitoModel.numCartao", "data.value.relatorioDebitoModel.nsa"})
in
    #"data.value.relatorioDebitoModel Expandido1"
 
in
let
allRows = Json.Document(Web.Contents("urlofapi")),
apiCallResults = List.Generate(() => [Offset = 1, apiPageResult = _GetAPIPageData(0)],
                    each [Offset] <= allRows[data][value][quantidadeTotalPaginas] + 1,
                    each [apiPageResult = _GetAPIPageData( [Offset]), Offset = [Offset] + 1 ],
                    each [apiPageResult])
 
in
Table.Combine(apiCallResults)
in
    Consulta1

Can anyone help?
1 REPLY 1
lbendlin
Super User
Super User

please refer to the documentation. Use RelativePath and Query options.

Web.Contents - PowerQuery M | Microsoft Learn

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.