Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

OData service Expand error

Hi All,

 

I created an ODATA api in .NET 5 (C#) and when testing in the browser this is working fine.

It has several parent entities and having enabled expand() I can get related child entities with a query like ~/odata/parent?$expand=child. 

 

Unfortunately this is not working in PowerBI. If I go the the baseUrl (~/odata/) I get all my parent tables nicely and selecting one also loads the parent level data with column in the back that I could 'expand'. 

 

When selecting the expand button or clicking on the table link (in the cell) I get the following error: 

 

DataFormat.Error: OData: The format 'text/html' is not supported. Details: text/html
 
I created a seperate controller only for the child entity and that is working.
 
Since PowerBI is the only environment I have the problem with I end up asking the question here as I might be overlooking something (is expanding in powerbi the same as the expand query? Why does it complain about text/html as I only return json,..).
 
Thanks
Davy

2 Replies