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

Error when loading data: "We cannot convert a value of type Record to type Table"

Hi everyone, I'm getting the following error with my query:

MichaelHutchens_0-1668482022186.png

 

Here's my code:

let
  Source = Table.Combine(
        {
SharePoint.Tables("https://aklcouncil.sharepoint.com/sites/change-proposals/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/council-news/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/department-news/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/how-we-work/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/about-me/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/my-council-journey/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/our-locations/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/policies/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/teams-groups/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/tools-to-do-my-job/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/wellbeing-and-safety/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://___.com/sites/who-we-are/", [Implementation="2.0", ViewMode="All"])
        }
    ),
  #"Removed Columns" = Table.RemoveColumns(Source, {"odata.type"}),
  #"Filtered Rows" = Table.SelectRows(#"Removed Columns", each [Title] = "Site Pages"),
  #"Removed Columns1" = Table.RemoveColumns(#"Filtered Rows", {"IsLeaf", "ItemKind", "ItemName", "odata.etag", "odata.editLink", "Items@odata.navigationLinkUrl", "Title"}),
  #"Expanded Items" = Table.ExpandTableColumn(#"Removed Columns1", "Items", {"Name", "Topic", "Audience"}, {"Items.Name", "Items.Topic", "Items.Audience"}),
  #"Expanded Items.Topic" = Table.ExpandTableColumn(#"Expanded Items", "Items.Topic", {"Label", "TermID"}, {"Items.Topic.Label", "Items.Topic.TermID"}),
  #"Expanded Items.Audience" = Table.ExpandTableColumn(#"Expanded Items.Topic", "Items.Audience", {"Label", "TermID"}, {"Items.Audience.Label", "Items.Audience.TermID"}),
  #"Renamed Columns" = Table.RenameColumns(#"Expanded Items.Audience", {{"Items.Topic.Label", "Label.Topic"}, {"Items.Topic.TermID", "Label.Topic ID"}, {"Items.Audience.Label", "Label.Audience"}, {"Items.Audience.TermID", "Label.Audience ID"}}),
  #"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns", {"odata.id", "Items.Name", "Id", "Label.Topic", "Label.Topic ID", "Label.Audience", "Label.Audience ID"}),
  #"Split Column by Delimiter" = Table.SplitColumn(#"Reordered Columns", "odata.id", Splitter.SplitTextByEachDelimiter({"/_api"}, QuoteStyle.Csv), {"odata.id.1", "odata.id.2"}),
  #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter", {{"odata.id.1", type text}, {"odata.id.2", type text}}),
  #"Removed Columns2" = Table.RemoveColumns(#"Changed Type", {"odata.id.2"}),
  #"Added Suffix" = Table.TransformColumns(#"Removed Columns2", {{"odata.id.1", each _ & "/SitePages/", type text}}),
  #"Merged Columns" = Table.CombineColumns(#"Added Suffix", {"odata.id.1", "Items.Name"}, Combiner.CombineTextByDelimiter("", QuoteStyle.None), "URL"),
  #"Removed Columns3" = Table.RemoveColumns(#"Merged Columns", {"Id"}),
  #"Transform columns" = Table.TransformColumnTypes(#"Removed Columns3", {{"Label.Topic", type text}, {"Label.Topic ID", type text}, {"Label.Audience", type text}, {"Label.Audience ID", type text}}),
  #"Replace errors" = Table.ReplaceErrorValues(#"Transform columns", {{"Label.Topic", null}, {"Label.Topic ID", null}, {"Label.Audience", null}, {"Label.Audience ID", null}})
in
  #"Replace errors"

 
Might someone be able to show me what I'm doing wrong? 

Thanks so much in advance for your time 🙂

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @MichaelHutchens ,

Please check in Power Query, in which step the error begins. Because I have no access to the data source, I can't apply the steps in my side.

 

Best Regards,
Community Support Team _ kalyj

Hi @v-yanjiang-msft , I've isolated the problem a bit more:

MichaelHutchens_1-1668612861482.png


MichaelHutchens_0-1668612844694.png


Does that help? 🙂

Hi @MichaelHutchens ,

Please check what's the diffrence of the error cell and other cells before the error occurs.

Best Regards,
Community Support Team _ kalyj

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.