Forum Discussion
OData feed expand does not display results
Hi GFinlayTerumo ,
The fix is to use Table.ExpandRecordColumn right after your Source step, and make sure your OData query includes both $expand and $select for the related table/fields you need. This makes those nested fields show up as regular columns that you can work with in Power BI. Example in Power Query (M):
let
Source = OData.Feed("https://your-odata-url"),
Expanded = Table.ExpandRecordColumn(Source, "Clinician", {"Name"}, {"Clinician.Name"})
in
Expanded
Double-check that your OData service supports V4 and that your field names match exactly (case matters). If things still look weird, run your query in Query Diagnostics or even Postman to see what’s coming back. You might need to expand more than once if you have multiple nested levels.
Hi rohit1991 and lbendlin thanks for taking the time to answer my query.
1) I have input my URL into Postman and it successfully returns what I am looking for;
2) Using expand=CaseManagement_Clinician does the same thing where it doesn't display anything. Including it in my select returns the record and I can expand it manually to see Name, this is what I am trying to avoid though as am I right in saying this is generating a call to the server per line?
3) I don't think data privacy will be an issue as the account has access to all of the columns within all of the tables, would the naviagtion property you mentioned be on the Mendix side or PBI? I'm unsure if this will be an issue as you can see Postman is returning correctly.
I've also loaded in the Clinicians table as it's own Query using OData however it doesn't seem to have changed anything. I can successfuly manually expand the CaseManagement_Clinicians to get ID and create the relationship within the Model but I'd be as well manually expanding for Name. Because the Mendix system is set up to display associations as a link as opposed to object id (see below) I do not have access to the IDs without returning the Record within the OData select.
The Mendix application is set up for OData 4 and the Clinician table has Name in it.
When manually expanding out the Clinician table and looking on Query Diagnoistics it looks like the following, I am unsure what to expect from this but it looks to be successfully doing what is being asked.
I also tried this with the expand in the URL and it returns a 200 code as well
Thanks
Grant