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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

Salesforce Object Connector - Nested query


I have a problem receiving the data that I want from the object connector. Through the Salesforce database our developer is able to query the data using a "nested query":


In Power BI I have enabled "Include relationship columns" when I load ClassMembership__Feed to get the column; however, when I try to expand FeedTrackedChanges I get:


The M-code looks like this (on a text-expand)



    Source = Salesforce.Data("", [CreateNavigationProperties=true]),
    ClassMembership__Feed = Source{[Name="ClassMembership__Feed"]}[Data],
    #"Expanded FeedTrackedChanges" = Table.ExpandTableColumn(ClassMembership__Feed, "FeedTrackedChanges", {"Id", "FeedItemId", "FieldName", "OldValue", "NewValue"}, {"FeedTrackedChanges.Id", "FeedTrackedChanges.FeedItemId", "FeedTrackedChanges.FieldName", "FeedTrackedChanges.OldValue", "FeedTrackedChanges.NewValue"})
    #"Expanded FeedTrackedChanges"




How can I replicate the resonse that the developer is getting from Salesforce direct query?

Helper IV
Helper IV

Hi @Nexans I know this reply is very late, but were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector, you'll be able to query all fields you need. I've tried, supermetrics and I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Salesforce connector in the data sources list:




After that, just grant access to your Salesforce account using your credentials, then on preview and destination page you will see a preview of your Salesforce fields:




There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor.  Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 



Regular Visitor

@Nexans were you ever able to figure this out? Finding a lot of information about how to nest queries, but none that explain if it is possible in Power Query/M. Any insight you've gained since the original post would be most welcome.

Community Support
Community Support

Hi @Nexans ,


Please check whether this post could help you: Querying Salesforce Activity History using Power Query raises DataSource.Error.




Best Regards,



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Frequent Visitor

Thanks, but this only explains what I write in my question; that we are able to extract the data using query in SF. 


However, it does not answer how we could do this in Power BI using the Salesforce Object Connector.

Frequent Visitor

As the query image was poor. 




Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors