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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
phi2134
Helper I
Helper I

Advanced Query Editor to change Salesforce Object Credentials

Is it possible to change your SFDC object credentials within the Advanced Query Editor?  I need to bring in SFDC objects from multiple SFDC instances and since you cant have multiple accounts logged in, i was curious if you could do this right in the advanced query editor.

4 REPLIES 4
pablobarra
Advocate I
Advocate I

Hi

You should be able to get Salesforce data from multiple instances in the same dataset.

If you use the option get data from Salesforce and select "Custom" for both instances (even thougth they are production evironment, you need to select custom) and you add the url, you can select any object and combine the data.

 

You can use as URL the URL of your instance, for example:

https://cs82.salesforce.com/

https://emea.salesforce.com/

https://login.salesforce.com/

etc

 

The M code should look like this 3 examples:

Query 1

let
Source = Salesforce.Data("https://cs85.salesforce.com/"),
Opportunity1 = Source{[Name="Opportunity"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(Opportunity1,{"Id", "Name"})
in
#"Removed Other Columns"

Query 2

let
Source = Salesforce.Data("https://emea.salesforce.com/"),
Opportunity1 = Source{[Name="Opportunity"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(Opportunity1,{"Id"})
in
#"Removed Other Columns"

Query 3

let
Source = Salesforce.Data("https://cs80.salesforce.com/"),
Opportunity1 = Source{[Name="Opportunity"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(Opportunity1,{"Id", "Name"})
in
#"Removed Other Columns"

 

In the examples, one of them is production and the other 2 are prelive. It is the same if all of them are production, you can add them as different Custom Salesforce data sources.

 

Regards

v-sihou-msft
Microsoft Employee
Microsoft Employee

@phi2134

 

No, Power Query only call Salesforce.Data() function, it's not possible to edit credential within Query Editor.

 

Capture.PNG

 

Regards,

Is there a workaround that would allow multiple Salesforce datasets?  We need a to be able to aggregate data across mulitple Salesforce orgs.

Nope, not that I know of.  This is currently not possible and we are facing the same issues still.  The only option we ahve right now is to upload multiple sfdc datasets from different pbix files to the same workspace, there they can at least be shown together on a single dashboard, but not in a single report.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.