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

PBI Advanced editor "Apply" table: "We cannot convert a value of type Record to type List" error;

I'm a bit of a noobie to PBI; I have transformed my data in advanced editor and everything looks great; data is a list of records retrieved using web.contents() function.

 

Preview Table:

***************

ni1i2t1t2dcc_flat
000168337911616833791160[List]ISUZU D-MAX (BFS 921-M),BFS-921,Southern,LA,MFS
100168336119116833611910[List]Toyota Hilux (FAC 645),FAC-645,Southern,NY,BUSINESS SOLUTIONS

 

sample PBI query using web.contents():

******************************************

let
sessionID = Text.From(xyz),

prefix = URL,
Source = Json.Document(Web.Contents(prefix & sessionID)),
Flattened = List.Transform(Source, each Record.AddField(_, "c_flat", Text.Combine([c], ","))),
Result = Table.FromRecords(Flattened)
in
Result

 

data is transformed in advanced editor no problems; when i click "apply" to save preview to model; i get "We cannot convert a value of type Record to type List" error; I cannot for the life of me overcome is error.

 

When i load the data directly into script instead of pulling via web.contents() the data is transformed as expected and preview table can be "apply" saved to model

 

sample script without web.contents():

***************************************

let
Source = Json.Document("[{""n"":0,""i1"":0,""i2"":0,""t1"":1683379116,""t2"":1683379116,""d"":0,""c"":[""ISUZU D-MAX (BFS 921-M)"",""BFS-921"",""Southern"",""LA"",""MFS""]},{""n"":1,""i1"":0,""i2"":0,""t1"":1683361191,""t2"":1683361191,""d"":0,""c"":[""Toyota Hilux (FAC 645)"",""FAC-645"",""Southern"",""NY"",""BUSINESS SOLUTIONS""]}]"),
Flattened = List.Transform(Source, each Record.AddField(_, "c_flat", Text.Combine([c], ","))),
Result = Table.FromRecords(Flattened)
in
Result

 

sample json data:

*******************

[{"n":0,"i1":0,"i2":0,"t1":1683379116,"t2":1683379116,"d":0,"c":["ISUZU D-MAX (BFS 921-M)","BFS-921","Southern","LA","MFS"]},{"n":1,"i1":0,"i2":0,"t1":1683361191,"t2":1683361191,"d":0,"c":["Toyota Hilux (FAC 645)","FAC-645","Southern","NY","BUSINESS SOLUTIONS"]}]

 

I'm thinking the web.content() function has a limitation when handling a list of records. Any suggetions and work arounds would be greatly appreciated...cheers

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous,

I copy your sample data and find these testing data can be correctly recognized and expanded these records in query editor side.

Can you please share some sample data with more complex records? They may cause the issue to recognize when your records nested different structures.

1.PNG

Notice: these query steps are recognized and auto generated by data connecting steps.

Regards,

Xiaoxin Sheng

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.