Skip to main content
cancel
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

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