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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

Reply
longhorntaco
New Member

Expanding a single list from an OData source with multiple types

I have an OData feed that I'm injesting into PBI Desktop.  One of those fields is a collection of Events.  From /odata/$metadata:

<EntityType Name="Interaction" BaseType="MyApp.Entity">

     ......
     <Property Name="Events" Type="Collection(MyApp.Event)" Nullable="false"/>

     ......
</EntityType>

 

The MyApp.Event type is just a common base class.  The items in that collection are actually derived classes of MyApp.Event.  When viewing the raw data from the odata feed, I see all the fields are available for the different types.  However, when I attempt to expand the column in PBI, it only gives me the fields on the MyApp.Event type to select.  None of the other fields from the derived classes are available.  I suppose this makes complete sense, but is there a way for me to get at the other fields on the derived classes, since that data is actually there?

 

**Update:**

I found the Advanced Editor and was able to add my missing fields.

    #"Expanded Events1" = Table.ExpandRecordColumn(#"Expanded Events", "Events", {"DefinitionId", "Url"}, {"DefinitionId", "Url"}),

I added the "Url" field.

 

However, the field is always returning null.  If I open Fiddler and watch the queries/traffic when refreshing the data, I can see that data in that field is indeed getting returned by the odata feed, PBI just isn't picking it up.

 

Thoughts?

 

Thanks!

3 REPLIES 3
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@longhorntaco,

Are you able to get required data when connecting to your data source in other applications such as Excel?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

When I attempt to connect through Excel, I get the following error:

Untitled.png

However, retrieving the data directly from the URL (in a browser) returns the proper data.  Accessing the data from Fiddler or Postman returns the proper data.  Accessing the data from code (C# console app) returns the proper data.

 

Here's an example of the raw JSON output from the OData feed:

json.png

 

I understand why the OOTB UI in PowerBI doesn't let me select the extra columns that aren't always there, but there must be a way to get that data through some other means in PBI?

@longhorntaco,

I can't test your scenario from my side. Is there any possibility that you can export JSON data from the OData feed and connect to the JSON data using JSON connector in Power BI Desktop?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.