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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

We cannot convert "Accountsync" to type record

Hello everyone,

 

I get this error in this code:

 

let
source = Web.Contents("https://localhost:44346/WeatherForecast/TableList"),
json = Json.Document(Text.FromBinary(source)),
convertToTable = Table.FromList(json, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
columnNames = Record.FieldNames(Table.FirstValue(convertToTable)),
ExpandedColumn1 = Table.ExpandRecordColumn(convertToTable, "Column1", columnNames),
selectColumn = Table.Column(ExpandedColumn1, columnNames{0})
in
selectColumn;

 

This is the data in "source = Web.Contents("https://localhost:44346/WeatherForecast/TableList":

 

[  "AccountSync",  "AggregateState",  "BatchQueue",  "BatchSchedule",  "Binaries",  "BinaryStoreVersion",  "CategoryRiskTotals",  "ClientEvents",  "ClientEventStoreLastEvents",  "Departments",  "Logs",  "MultiSelect",  "Organizations",  "PitStopDayTotals",  "PitStopMonthTotals",  "ProjectionBuilderShard",  "ProjectionBuilderVersion",  "ProjectionStoreVersion",  "QuestionRiskTotals",  "RiskTotals",  "SitStandDayTotals",  "SitStandMonthTotals",  "Streams",  "StreamStoreVersion",  "Surveys",  "SurveyTemplates",  "SurveyUsers",  "UserDepartments",  "UserQuestionRisks",  "UserRiskTotals",  "Users"
]

 But when I get data from "source = Web.Contents("https://localhost:44346/WeatherForecast/" it works perfectly fine, which contains the data:

 

[  {
    "date": "2021-11-19T14:34:51.8028071+01:00",    "temperatureC": 1,    "temperatureF": 33,    "summary": "Freezing"
  },
  {
    "date": "2021-11-20T14:34:51.8033779+01:00",    "temperatureC": 21,    "temperatureF": 69,    "summary": "Cool"
  },
  {
    "date": "2021-11-21T14:34:51.8033806+01:00",    "temperatureC": -13,    "temperatureF": 9,    "summary": "Hot"
  },
  {
    "date": "2021-11-22T14:34:51.803381+01:00",    "temperatureC": 40,    "temperatureF": 103,    "summary": "Warm"
  },
  {
    "date": "2021-11-23T14:34:51.8033812+01:00",    "temperatureC": 20,    "temperatureF": 67,    "summary": "Cool"
  }
]

 

Do I need to change the Splitter.SplitByNothing() parameter? If yes, what do I need to change? If no, what else do I have to change in the code?

 

Thank you.

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

let
    Source = "[  {#(cr)#(lf)    ""date"": ""2021-11-19T14:34:51.8028071+01:00"",    ""temperatureC"": 1,    ""temperatureF"": 33,    ""summary"": ""Freezing""#(cr)#(lf)  },#(cr)#(lf)  {#(cr)#(lf)    ""date"": ""2021-11-20T14:34:51.8033779+01:00"",    ""temperatureC"": 21,    ""temperatureF"": 69,    ""summary"": ""Cool""#(cr)#(lf)  },#(cr)#(lf)  {#(cr)#(lf)    ""date"": ""2021-11-21T14:34:51.8033806+01:00"",    ""temperatureC"": -13,    ""temperatureF"": 9,    ""summary"": ""Hot""#(cr)#(lf)  },#(cr)#(lf)  {#(cr)#(lf)    ""date"": ""2021-11-22T14:34:51.803381+01:00"",    ""temperatureC"": 40,    ""temperatureF"": 103,    ""summary"": ""Warm""#(cr)#(lf)  },#(cr)#(lf)  {#(cr)#(lf)    ""date"": ""2021-11-23T14:34:51.8033812+01:00"",    ""temperatureC"": 20,    ""temperatureF"": 67,    ""summary"": ""Cool""#(cr)#(lf)  }#(cr)#(lf)]",
    #"Parse Json" = Json.Document(Source),
    Display = Table.FromRecords(#"Parse Json")
in
    Display

Screenshot 2021-11-18 170443.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

how about the data that contains in "source = Web.Contents("https://localhost:44346/WeatherForecast/TableList

 

which is 

[  "AccountSync",  "AggregateState",  "BatchQueue",  "BatchSchedule",  "Binaries",  "BinaryStoreVersion",  "CategoryRiskTotals",  "ClientEvents",  "ClientEventStoreLastEvents",  "Departments",  "Logs",  "MultiSelect",  "Organizations",  "PitStopDayTotals",  "PitStopMonthTotals",  "ProjectionBuilderShard",  "ProjectionBuilderVersion",  "ProjectionStoreVersion",  "QuestionRiskTotals",  "RiskTotals",  "SitStandDayTotals",  "SitStandMonthTotals",  "Streams",  "StreamStoreVersion",  "Surveys",  "SurveyTemplates",  "SurveyUsers",  "UserDepartments",  "UserQuestionRisks",  "UserRiskTotals",  "Users"
]

Hi @Anonymous 

 

Try this code. You can transpose it to a row if needed. 

let
    Source = "[  ""AccountSync"",  ""AggregateState"",  ""BatchQueue"",  ""BatchSchedule"",  ""Binaries"",  ""BinaryStoreVersion"",  ""CategoryRiskTotals"",  ""ClientEvents"",  ""ClientEventStoreLastEvents"",  ""Departments"",  ""Logs"",  ""MultiSelect"",  ""Organizations"",  ""PitStopDayTotals"",  ""PitStopMonthTotals"",  ""ProjectionBuilderShard"",  ""ProjectionBuilderVersion"",  ""ProjectionStoreVersion"",  ""QuestionRiskTotals"",  ""RiskTotals"",  ""SitStandDayTotals"",  ""SitStandMonthTotals"",  ""Streams"",  ""StreamStoreVersion"",  ""Surveys"",  ""SurveyTemplates"",  ""SurveyUsers"",  ""UserDepartments"",  ""UserQuestionRisks"",  ""UserRiskTotals"",  ""Users""#(cr)#(lf)]",
    #"Split Text" = Text.Split(Source, ","),
    #"Converted to Table" = Table.FromList(#"Split Text", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Replaced Value" = Table.ReplaceValue(#"Converted to Table","[","",Replacer.ReplaceText,{"Column1"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","]","",Replacer.ReplaceText,{"Column1"}),
    #"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","""","",Replacer.ReplaceText,{"Column1"}),
    #"Trimmed Text" = Table.TransformColumns(#"Replaced Value2",{{"Column1", Text.Trim, type text}})
in
    #"Trimmed Text"

21112404.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.