Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello mates,
i wrote a PowerBI connector in M which connects to a REST api and now i got a problem with the refresh of my data but only
in the web version, in the desktop version it works fine.
I read more than 15 threads e.g.
https://community.powerbi.com/t5/Service/The-HasUniqueRoleAssignments-column-does-not-exist-in-the-r...
but that's about deleting the column which causes the failure and i need that column.
"The column '...' of the table wasn't found" is the error message.
getData = (json, contentType, pos) =>
let
records = Table.FromRecords({json}),
listExpanded = Table.ExpandListColumn(records, pos),
result = ExpandAllRecords(listExpanded)
in
result;
ExpandAllRecords expands and renames the columns, removes the "record" in front of each column (from "record.XXX" to "XXX")
ExpandAllRecords = (TableToExpand as table, optional ColumnNumber as number) =>
let
ActualColumnNumber = if (ColumnNumber=null) then 0 else ColumnNumber,
ColumnName = Table.ColumnNames(TableToExpand){ActualColumnNumber},
ColumnContents = Table.Column(TableToExpand, ColumnName),
ColumnsToExpand = List.Distinct(List.Combine(List.Transform(ColumnContents,
each if _ is record then Record.FieldNames(_) else {}))),
NewColumnNames = List.Transform(ColumnsToExpand, each _),
CanExpandCurrentColumn = List.Count(ColumnsToExpand)>0,
ExpandedTable = if CanExpandCurrentColumn
then
Table.ExpandRecordColumn(TableToExpand, ColumnName,
ColumnsToExpand, NewColumnNames)
else
TableToExpand,
NextColumnNumber = if CanExpandCurrentColumn then ActualColumnNumber else ActualColumnNumber+1,
OutputTable = if NextColumnNumber>(Table.ColumnCount(ExpandedTable)-1)
then
ExpandedTable
else
ExpandAllRecords(ExpandedTable, NextColumnNumber)
in
OutputTable;
Nothing fancy and nothing with hardcoded count of columns.
I got about 20 different tables and that one is the only one which won't work.
Best regards
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!