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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
XeniaG
New Member

Accessing numerous records from API

Im quite new to PowerBI and this is the first time accessing an data via API. The data comes through as clickable records, which then provide the data, but Im hoping to get a table of all records with the data shown. 

 

When I select each record and convert to table, this is the resulting code:

Source = Json.Document(Web.Contents("URL",

[Headers=[AccountLoginName="abc",

AccountPassword="xyz123",

APIToken="apitoken"]])),

Data = Source[Data],
Data1 = Data{0},

Table1 = Record.ToTable(Data1)

in
Table1

 

So I was thinking Id be able to just do the above, but add:

 

Source = [Source],

Data = Source[Data],
Data1 = Data{0},
Data2 = Data{1},
Data3 = Data{2},

Table1 = Record.ToList(Data1),
Table2 = Record.ToList(Data2),
Table3 = Record.ToList(Data3),
AppendList = List.Combine({Data1,Data2,Data3})
in
AppendList

 

But it is resulting in error Expression.Error: We cannot convert a value of type Record to type List.

 

 

Where am I going wrong and how can I fix this? Any help is much appreciated!

1 REPLY 1
lbendlin
Super User
Super User

 but Im hoping to get a table of all records with the data shown. 

That depends on the structure of the result payload.  Can you show an example of what the API call returns?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors