Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I want to create a refresh-able data connection with Salesforce (report) to which R script is applied to transform some columns before the transformed data gets loaded into the report.
I know I can use on-premise gateway for R script and content pack connection with Salesforce, but how do I combine the both?
Hi @jonmak-jon As it's been mentioned, you can use a gateway to be able to refresh it. Another workaround would be to use an external connector that pulls data from the SF objects API and therefore does not require a gateway to refresh. 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:
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.
Most likely you'll be using R.Execute function to do your data wrangling.
Type the following command in your query to get more details about this
= #shared[R.Execute]
For an instruction on how to call R from the UI you can follow the article from
https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-in-query-editor/
Probably the only change you'll have to do is instead of loading CSV, load Salesforce data.
Another good resource
https://blog.gbrueckl.at/2016/05/running-local-scripts-power-bi/
I want to create a refresh-able data connection with Salesforce (report) to which R script is applied to transform some columns before the transformed data gets loaded into the report.
I know I can use on-premise gateway for R script and content pack connection with Salesforce, but how do I combine the both?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
12 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
8 | |
7 | |
7 |