This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
I wanted to test out the R script integration and ran into an error I cannot figure out how to get past.
I have R running and it will works with the basic "Iris" data set, but not for the one I want to use.
I want to access the Quandl datasets and installed the necessary Library and Package. I create a script in RStudio and ran it and it worked as expected pulling in data from Quandl.
It does not work when calling from PowerBI. I get the error " Unable to connect" ADO.NET: R script error: Could not find function "Quandl"
Looking at the PowerBI seciton I found a document that outlines the connection : https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-scripts/access
AND... Specifally calls out this "To run the script in Power BI Desktop, make sure the script runs successfully in a new and unmodified workspace. This means that all packages and dependencies must be explicitly loaded and run. You can use source() to run dependent scripts."
When I open up Rstudio or just R, the quandl package does not load automatically. So, my long drawn out question is this. The sample call I'm trying to make to Quandl is this: mydata = Quandl("FRED/GDP"). Can I enter that call into the PowerBI connection and expect to return results. Or do I reference the script I worte with the call in it called: Quandl_GDP. Either way neiter work, but I wanted to see which was the right path.
Thanks in advance
Rich
Hi Woodfin and thanks for the feedback,
I think the root cause for this is that packages are not loaded explicitly.
Does your script use ' library(PACKAGENAME) ' ? if not you should add these to make sure R knows to load the required packages.
As for 'Source()', in case you still need to use it: this is used for running additional scripts within yours. In this case you'd need to 'SetWD()' in the script before calling it or explicitly use the full path to your script. If not then R in PBI will not locate it correctly.
Let us know if this helps,
thanks, Avi Sander(PBI)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 25 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 28 | |
| 23 | |
| 23 |