Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I am trying to install R library in PowerBI R editor
If i write:
Why do you want to install it via Power BI?
Power BI performs actions that are repeatable (i.e.regular data refreshes) but you'd normally install a package just once.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Is it possible to use library out of Powerbi and still use it in Powerbi? How to do that? When I install library in R studio, it is saved in a temp folder as I can see... and not possible to use it in powerbi...
Change the installation path in R Studio to the path that you've entered in your PBI settings:
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Do you mean C:\Program Files\R\R-3.6.2\library? But i just found this folder is read only and however i change it to writable, it will be changed back automatically...
Sorry, I might have given the wrong advice here.
My R-libraries are installed in a local folder in the documents-path of my user.
I don't understand the details behind it, so hopefully someone else jumps in here.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
hmmm... what do u mean? you mean you R libraries, were downloaded via R studio, saved in a local folder, and you can use them in PowerBI??? How does that work? Where did you save them and how did you let PowerBI know where they are?
Actually, I didn't let Power BI know where they are.
Instead I just "told" R-Studio where they are:
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
I have exactly the same setting in R studio as you do and in Powerbi options...
how come it doesnt work for me?
Did you just write install.packages('name_of_lib') in R script editor in Powerbi? See the initial post, I have tried different combinitions and still doesnt work...
Hi @Anonymous
I have NEVER installed any package through Power BI.
I'm always using R-Studio to install my packages.
Unfortunately I have no idea why - if you also intall your packages through R-Studio- Power BI would not recognize them.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
I followed this post, but when I finish step 5, a new R studio session will be opened for me, but it is totally blank and does not carry any variable from Powerbi into it...
Hi @Anonymous
I'm not using this functionality, so cannot give any tips on that, unfortunately.
.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries