Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I have this code and i need to to pagination because i am blocked in 4000 rows
Thanks
let
Source = Json.Document(Web.Contents("https://aaa.com/e/b786781647146174618/api/v1/xxxx/yyyyy/hosts?tttt=true", [Headers=[Accept="application/json; charset=utf-8", Authorization="xxxx"]])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"entityId", "displayName", "discoveredName", "firstSeenTimestamp", "lastSeenTimestamp", "tags", "fromRelationships", "toRelationships", "osType", "osArchitecture", "osVersion", "hypervisorType", "ipAddresses", "bitness", "cpuCores", "logicalCpuCores", "monitoringMode", "networkZoneId", "agentVersion", "consumedHostUnits", "userLevel", "autoInjection", "managementZones", "hostGroup"}, {"Column1.entityId", "Column1.displayName", "Column1.discoveredName", "Column1.firstSeenTimestamp", "Column1.lastSeenTimestamp", "Column1.tags", "Column1.fromRelationships", "Column1.toRelationships", "Column1.osType", "Column1.osArchitecture", "Column1.osVersion", "Column1.hypervisorType", "Column1.ipAddresses", "Column1.bitness", "Column1.cpuCores", "Column1.logicalCpuCores", "Column1.monitoringMode", "Column1.networkZoneId", "Column1.agentVersion", "Column1.consumedHostUnits", "Column1.userLevel", "Column1.autoInjection", "Column1.managementZones", "Column1.hostGroup"}),
#"Expanded Column1.hostGroup" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.hostGroup", {"meId", "name"}, {"Column1.hostGroup.meId", "Column1.hostGroup.name"}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Expanded Column1.hostGroup", "Column1.hostGroup.name", Splitter.SplitTextByDelimiter("--", QuoteStyle.Csv), {"Column1.hostGroup.name.1", "Column1.hostGroup.name.2", "Column1.hostGroup.name.3"}),
#"Added Custom" = Table.AddColumn(#"Split Column by Delimiter", "ID_fromHG", each try Number.FromText([Column1.hostGroup.name.1]) otherwise null),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "source_env", each "STG")
in
#"Added Custom1"
Thanks for help
Hi @Zied_IT90 ,
You can take a look at the following document about the help functions about processing pagination API if it meets your requirement:
Helper functions for M extensions for Power Query connectors - Power Query | Microsoft Learn
This is the related document, you can view this content:
Solved: Pagination of a REST API in Power Query using M - Microsoft Power BI Community
Solved: REST API Paging Power Query - Microsoft Power BI Community
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Liu,
I tried to copy this code but in ToTable i find this problem :
Expression.Error: We cannot convert a value of type List to type Record.
= Record.ToTable(Source)
Details:
Value=[List]
Type=[Type]
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
56 | |
55 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
40 |