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
Anonymous
Not applicable

Adding REST API as Custom Column - Error: "We cannot convert a value of type Record to type List"

Hello All,

 

I have a table of identifiers using a rest API call. The table looks like this:

identifierURLdatecreatedauthorizeddate
a7f8sy9hh7g8ft55https://api.neogov.com/rest/personnelactions/hire/a7f8sy9hh7g8ft552023-02-15T10:25:14.02700002023-02-15T10:25:14.0270000
sjgg839hkwjr0fkthttps://api.neogov.com/rest/personnelactions/hire/sjgg839hkwjr0fkt2023-02-15T10:25:14.02700002023-02-15T10:25:14.0270000

 

I am adding a custom column that calls another api that reads the identifier and returns the api information.  Here is the code I use for the custom column. 

 

let

Source= Json.Document(Web.Contents("https://api.neogov.com/rest/personnelactions/hire/" & [ID], [Headers=[#"Content-Type" = "application/json",#"Authorization"= "Basic Token"]])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
#"Converted to Table"

 

It errors for all rows saying a record can not be converted to list. Any help would be appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I removed a conversion to table and just clalled the records then expanded the record. Here was teh code that worked:

let

Source= Json.Document(Web.Contents("https://api.neogov.com/rest/personnelactions/hire/" & [ID], [Headers=[#"Content-Type" = "application/json",#"Authorization"= "Basic Token"]]))

in

source

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

I removed a conversion to table and just clalled the records then expanded the record. Here was teh code that worked:

let

Source= Json.Document(Web.Contents("https://api.neogov.com/rest/personnelactions/hire/" & [ID], [Headers=[#"Content-Type" = "application/json",#"Authorization"= "Basic Token"]]))

in

source

lbendlin
Super User
Super User

Please read the Web.Contents documentation again (especially the RelativePath section). Also make sure that your API call returns data and not an error message.

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