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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nexans
Frequent Visitor

Salesforce Object Connector - Nested query

Hi.

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":

Nexans_0-1600246257275.jpeg

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:

Nexans_1-1600246530363.png

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

 

 

let
    Source = Salesforce.Data("https://login.salesforce.com/", [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"})
in
    #"Expanded FeedTrackedChanges"

 

 

 

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

5 REPLIES 5
ReportMaster
Helper V
Helper V

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 windsor.ai, supermetrics and funnel.io. 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:

 

SALESFORCE-1.png

 

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:

 

SALESFORCE-2.png

 

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. 

 

SELECT_DESTINATION_NEW.png

isaac_williams
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.

Icey
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,

Icey

 

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

Nexans
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.

Nexans
Frequent Visitor

As the query image was poor. 

Nexans_0-1600246973865.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors